From 75c0cafe4d18782083adba30981894ae2e4c9368 Mon Sep 17 00:00:00 2001 From: bgermann Date: Sun, 14 Oct 2018 16:31:24 +0200 Subject: [PATCH 1/3] [GB.DB.POSTGRESQL] Fix undefined TRUE/FALSE [GB.DB.POSTGRESQL] * BUG: Fix undefined TRUE/FALSE --- gb.db.postgresql/src/main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gb.db.postgresql/src/main.h b/gb.db.postgresql/src/main.h index b45b607f6..a952b9564 100644 --- a/gb.db.postgresql/src/main.h +++ b/gb.db.postgresql/src/main.h @@ -25,6 +25,7 @@ #define __MAIN_H #include "gambas.h" +#include "gb_common.h" #include "gb.db.h" #ifndef __MAIN_C From a0e95cc0b83f5fca962530fcaf9bfb38474ee4f2 Mon Sep 17 00:00:00 2001 From: bgermann Date: Sun, 14 Oct 2018 21:52:07 +0200 Subject: [PATCH 2/3] Spelling: catched -> caught --- gb.jit.llvm/src/jit_codegen.cpp | 2 +- main/gbx/gbx_c_process.c | 2 +- main/lib/signal/csignal.c | 2 +- main/share/gambas.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gb.jit.llvm/src/jit_codegen.cpp b/gb.jit.llvm/src/jit_codegen.cpp index c90a98e4f..96c11f980 100644 --- a/gb.jit.llvm/src/jit_codegen.cpp +++ b/gb.jit.llvm/src/jit_codegen.cpp @@ -3709,7 +3709,7 @@ void LargeCatchExpression::codegen(){ //Also in ReturnExpression if returning before this builder->CreateCall(get_global_function(JR_end_try, 'v', "p"), create_gep(temp_errcontext2, TARGET_BITS, 0, TARGET_BITS, 0)); - //Differs from original interpreter, error thrown in a Finally block is not catched. + //Differs from original interpreter, error thrown in a Finally block is not caught. builder->CreateStore(get_nullptr(), get_global((void*)&EC)); } diff --git a/main/gbx/gbx_c_process.c b/main/gbx/gbx_c_process.c index a6f5d23ac..eba4a9138 100644 --- a/main/gbx/gbx_c_process.c +++ b/main/gbx/gbx_c_process.c @@ -979,7 +979,7 @@ void CPROCESS_wait_for(CPROCESS *process, int timeout) fprintf(stderr, "Waiting for %d\n", process->pid); #endif - // If CPROCESS_check() catched the process end, process->running is not set yet, because + // If CPROCESS_check() caught the process end, process->running is not set yet, because // stop_process() will be raised at the next event loop. So no need to wait for it. if (process->wait) diff --git a/main/lib/signal/csignal.c b/main/lib/signal/csignal.c index 881fec23b..5ce5c6c91 100644 --- a/main/lib/signal/csignal.c +++ b/main/lib/signal/csignal.c @@ -131,7 +131,7 @@ static void handle_signal(int num, char state) { if (num == SIGKILL || num == SIGSTOP) { - GB.Error("SIGKILL and SIGSTOP cannot be catched"); + GB.Error("SIGKILL and SIGSTOP cannot be caught"); return; } diff --git a/main/share/gambas.h b/main/share/gambas.h index 4b29374d8..756d1dd71 100644 --- a/main/share/gambas.h +++ b/main/share/gambas.h @@ -594,7 +594,7 @@ typedef #define CALL_HOOK_MAIN(_hook, _pargc, _pargv) do { if (_hook) { ((void (*)(int *, char ***))(_hook))((_pargc), (_pargv)); } } while (0); -/* Constants that represent interpreter signals catched by GB_SIGNAL function */ +/* Constants that represent interpreter signals caught by GB_SIGNAL function */ #define GB_SIGNAL_DEBUG_BREAK 1 #define GB_SIGNAL_DEBUG_CONTINUE 2 From dace3b09aca1e7c449978c9a163be693247a2841 Mon Sep 17 00:00:00 2001 From: bgermann Date: Mon, 15 Oct 2018 18:48:01 +0200 Subject: [PATCH 3/3] Remove boolean definitions except in gb_common.h --- gb.db.sqlite2/src/main.h | 2 -- gb.gtk/src/font-parser.cpp | 45 ++++++++++++++++---------------------- gb.jit.llvm/src/jit.h | 3 --- main/lib/image.effect/qt.h | 3 --- main/lib/jit/gb.jit/jit.h | 3 --- 5 files changed, 19 insertions(+), 37 deletions(-) diff --git a/gb.db.sqlite2/src/main.h b/gb.db.sqlite2/src/main.h index 857fd4236..564a97bbe 100644 --- a/gb.db.sqlite2/src/main.h +++ b/gb.db.sqlite2/src/main.h @@ -38,8 +38,6 @@ extern DB_INTERFACE DB; #define QUOTE_STRING "'" #define MAX_PATH 132 /* MAX LENGTH OF FILENAME PATH */ -#define TRUE 1 -#define FALSE 0 #include "gb.db.proto.h" diff --git a/gb.gtk/src/font-parser.cpp b/gb.gtk/src/font-parser.cpp index 52c4008a9..dc9786555 100644 --- a/gb.gtk/src/font-parser.cpp +++ b/gb.gtk/src/font-parser.cpp @@ -21,17 +21,10 @@ ***************************************************************************/ +#include #include #include -#ifndef TRUE -#define TRUE -1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - static char *gb_font_pointers[8]; static char *gb_font_name; static int gb_font_strikeout; @@ -106,11 +99,11 @@ void gb_font_trim() int gb_font_is_size(char *str) { long bc,max; - int rel=FALSE; + int rel=false; int vl=0; int fact=1; - if (!str) return TRUE; + if (!str) return true; max=strlen(str); for(bc=0;bc extern "C" { -#define FALSE false -#define TRUE true - #include #include diff --git a/main/lib/image.effect/qt.h b/main/lib/image.effect/qt.h index c0bc9439c..ade1f7e00 100644 --- a/main/lib/image.effect/qt.h +++ b/main/lib/image.effect/qt.h @@ -34,9 +34,6 @@ #define QT_STATIC_CONST static const #define QT_STATIC_CONST_IMPL const -#define FALSE false -#define TRUE true - #define QMAX(a, b) ((b) < (a) ? (a) : (b)) #define QMIN(a, b) ((a) < (b) ? (a) : (b)) #define QABS(a) ((a) >= 0 ? (a) : -(a)) diff --git a/main/lib/jit/gb.jit/jit.h b/main/lib/jit/gb.jit/jit.h index 22c687e30..e2ec9ff1e 100644 --- a/main/lib/jit/gb.jit/jit.h +++ b/main/lib/jit/gb.jit/jit.h @@ -4,9 +4,6 @@ #include //#include -#define TRUE 1 -#define FALSE 0 - // __attribute__((noreturn)) makes gcc dizzy and slow as hell #define NORETURN