Merge branch 'master' into 'master'
Fix undefined TRUE/FALSE in postgresql driver, don't use or define TRUE/FALSE constants if not needed, and fix some english mistakes. [INTERPRETER] * BUG: Fix some english mistakes in comments of various files. [GB.DB.POSTGRESQL] * BUG: Fix undefined TRUE/FALSE [GB.DB.SQLITE2] * NEW: Do not define TRUE/FALSE constants. [GB.GTK] * NEW: Do not use TRUE/FALSE constants in 'font-parser.cpp'. [GB.GTK3] * NEW: Do not use TRUE/FALSE constants in 'font-parser.cpp'. [GB.JIT] * NEW: Remove the definition of TRUE/FALSE constants in generated code. That prevents the generated code from compiling, so it will be undone in a next commit. [GB.SIGNAL] * BUG: Fix an english mistake in an error message. See merge request gambas/gambas!45
This commit is contained in:
commit
f24657f3ba
10 changed files with 24 additions and 41 deletions
|
@ -25,6 +25,7 @@
|
|||
#define __MAIN_H
|
||||
|
||||
#include "gambas.h"
|
||||
#include "gb_common.h"
|
||||
#include "gb.db.h"
|
||||
|
||||
#ifndef __MAIN_C
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -21,17 +21,10 @@
|
|||
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#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<max;bc++)
|
||||
|
@ -122,16 +115,16 @@ int gb_font_is_size(char *str)
|
|||
vl*=10; vl+=(str[bc]-48); break;
|
||||
|
||||
case '+':
|
||||
if (!bc) rel=TRUE;
|
||||
else return TRUE;
|
||||
if (!bc) rel=true;
|
||||
else return true;
|
||||
break;
|
||||
|
||||
case '-':
|
||||
if (!bc) { rel=TRUE; fact=-1; }
|
||||
else return TRUE;
|
||||
if (!bc) { rel=true; fact=-1; }
|
||||
else return true;
|
||||
break;
|
||||
|
||||
default: return TRUE;
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,7 +132,7 @@ int gb_font_is_size(char *str)
|
|||
gb_font_relative=rel;
|
||||
if (gb_font_relative) gb_font_size*=fact;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void gb_fontparser_parse(char *str)
|
||||
|
@ -150,12 +143,12 @@ void gb_fontparser_parse(char *str)
|
|||
|
||||
for (bc=0;bc<8;bc++) gb_font_pointers[bc]=NULL;
|
||||
gb_font_name=NULL;
|
||||
gb_font_strikeout=FALSE;
|
||||
gb_font_underline=FALSE;
|
||||
gb_font_italic=FALSE;
|
||||
gb_font_bold=FALSE;
|
||||
gb_font_relative=FALSE;
|
||||
gb_font_size=0;
|
||||
gb_font_strikeout=false;
|
||||
gb_font_underline=false;
|
||||
gb_font_italic=false;
|
||||
gb_font_bold=false;
|
||||
gb_font_relative=false;
|
||||
gb_font_size=0;
|
||||
|
||||
max=strlen(str);
|
||||
for (bc=0;bc<max;bc++)
|
||||
|
@ -169,10 +162,10 @@ void gb_fontparser_parse(char *str)
|
|||
{
|
||||
if ( gb_font_pointers[bc]==NULL ) break;
|
||||
|
||||
if (!strcasecmp(gb_font_pointers[bc],"bold")) gb_font_bold=TRUE;
|
||||
else if (!strcasecmp(gb_font_pointers[bc],"italic")) gb_font_italic=TRUE;
|
||||
else if (!strcasecmp(gb_font_pointers[bc],"underline")) gb_font_underline=TRUE;
|
||||
else if (!strcasecmp(gb_font_pointers[bc],"strikeout")) gb_font_strikeout=TRUE;
|
||||
if (!strcasecmp(gb_font_pointers[bc],"bold")) gb_font_bold=true;
|
||||
else if (!strcasecmp(gb_font_pointers[bc],"italic")) gb_font_italic=true;
|
||||
else if (!strcasecmp(gb_font_pointers[bc],"underline")) gb_font_underline=true;
|
||||
else if (!strcasecmp(gb_font_pointers[bc],"strikeout")) gb_font_strikeout=true;
|
||||
else
|
||||
{
|
||||
if (gb_font_is_size(gb_font_pointers[bc])) gb_font_name=gb_font_pointers[bc];
|
||||
|
|
|
@ -76,9 +76,6 @@
|
|||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#define FALSE false
|
||||
#define TRUE true
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
#include <setjmp.h>
|
||||
//#include <stdio.h>
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
// __attribute__((noreturn)) makes gcc dizzy and slow as hell
|
||||
#define NORETURN
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue