[geany/geany] ded5ea: Move debug related code to debug.c/h

Jiří Techet git-noreply at xxxxx
Mon Dec 17 21:05:36 UTC 2018


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Sat, 08 Oct 2016 12:13:41 UTC
Commit:      ded5ea3eeaefa0c7ac25f685015668b34dbf4fcb
             https://github.com/geany/geany/commit/ded5ea3eeaefa0c7ac25f685015668b34dbf4fcb

Log Message:
-----------
Move debug related code to debug.c/h


Modified Paths:
--------------
    ctags/Makefile.am
    ctags/main/debug.c
    ctags/main/debug.h
    ctags/main/entry.c
    ctags/main/general.h
    ctags/main/lregex.c
    ctags/main/main.c
    ctags/main/parse.c
    ctags/main/sort.c
    ctags/parsers/powershell.c

Modified: ctags/Makefile.am
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -57,6 +57,7 @@ libctags_la_SOURCES = \
 	main/args.h \
 	main/ctags.h \
 	main/debug.h \
+	main/debug.c \
 	main/entry.c \
 	main/entry.h \
 	main/error.c \


Modified: ctags/main/debug.c
23 lines changed, 23 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,23 @@
+/*
+*   Copyright (c) 1996-2002, Darren Hiebert
+*
+*   This source code is released for free distribution under the terms of the
+*   GNU General Public License version 2 or (at your option) any later version.
+*
+*   This module contains debugging functions.
+*/
+
+/*
+*   INCLUDE FILES
+*/
+#include "general.h"  /* must always come first */
+
+#include <glib.h>
+
+#include "debug.h"
+
+/* wrap g_warning so we don't include glib.h for all parsers, to keep compat with CTags */
+void utils_warn(const char *msg)
+{
+	g_warning("%s", msg);
+}


Modified: ctags/main/debug.h
15 lines changed, 12 insertions(+), 3 deletions(-)
===================================================================
@@ -14,9 +14,18 @@
 */
 #include "general.h"  /* must always come first */
 
-#ifdef DEBUG
-# include <assert.h>
-#endif
 #include "entry.h"
 
+/*
+*   Macros
+*/
+
+/* fake debug statement macro */
+#define DebugStatement(x)      ;
+#define PrintStatus(x)         ;
+/* wrap g_warning so we don't include glib.h for all parsers, to keep compat with CTags */
+extern void utils_warn(const char *msg);
+#define Assert(x) if (!(x)) utils_warn("Assert(" #x ") failed!")
+#define AssertNotReached() Assert(!"The control reaches unexpected place")
+
 #endif  /* CTAGS_MAIN_DEBUG_H */


Modified: ctags/main/entry.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -35,6 +35,7 @@
 #endif
 
 #include "ctags.h"
+#include "debug.h"
 #include "entry.h"
 #include "main.h"
 #include "options.h"


Modified: ctags/main/general.h
6 lines changed, 0 insertions(+), 6 deletions(-)
===================================================================
@@ -96,12 +96,6 @@ int fnmatch(const char *pattern, const char *string, int flags);
 #endif
 
 
-/* fake debug statement macro */
-#define DebugStatement(x)      ;
-#define PrintStatus(x)         ;
-/* wrap g_warning so we don't include glib.h for all parsers, to keep compat with CTags */
-void utils_warn(const char *msg);
-#define Assert(x) if (!(x)) utils_warn("Assert(" #x ") failed!")
 /*
 *   DATA DECLARATIONS
 */


Modified: ctags/main/lregex.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -27,6 +27,7 @@
 # endif
 #endif
 
+#include "debug.h"
 #include "mio.h"
 #include "entry.h"
 #include "parse.h"


Modified: ctags/main/main.c
8 lines changed, 0 insertions(+), 8 deletions(-)
===================================================================
@@ -22,8 +22,6 @@
 */
 #include "general.h"  /* must always come first */
 
-#include <glib.h>
-
 /*  To provide timings features if available.
  */
 #ifdef HAVE_CLOCK
@@ -168,9 +166,3 @@ static void printTotals (const clock_t *const timeStamps)
 }
 
 #endif /* Unused in Geany */
-
-/* wrap g_warning so we don't include glib.h for all parsers, to keep compat with CTags */
-void utils_warn(const char *msg)
-{
-	g_warning("%s", msg);
-}


Modified: ctags/main/parse.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -15,7 +15,7 @@
 
 #include <string.h>
 
-
+#include "debug.h"
 #include "mio.h"
 #include "entry.h"
 #include "keyword.h"


Modified: ctags/main/sort.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -18,6 +18,7 @@
 #include <string.h>
 #include <stdio.h>
 
+#include "debug.h"
 #include "entry.h"
 #include "routines.h"
 #include "options.h"


Modified: ctags/parsers/powershell.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -14,6 +14,7 @@
 *   INCLUDE FILES
 */
 #include "general.h"  /* must always come first */
+#include "debug.h"
 #include "main.h"
 #include "parse.h"
 #include "read.h"



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list