diff --git a/app/src/gambas3/.lang/.pot b/app/src/gambas3/.lang/.pot index 5019e80b5..bec1ff4a4 100644 --- a/app/src/gambas3/.lang/.pot +++ b/app/src/gambas3/.lang/.pot @@ -254,7 +254,7 @@ msgstr "" msgid "OpenGL display" msgstr "" -#: CComponent.class:436 +#: CComponent.class:445 msgid "Loading information on component &1..." msgstr "" diff --git a/app/src/gambas3/.src/Component/CComponent.class b/app/src/gambas3/.src/Component/CComponent.class index c73740d8c..a1dce1ead 100644 --- a/app/src/gambas3/.src/Component/CComponent.class +++ b/app/src/gambas3/.src/Component/CComponent.class @@ -263,7 +263,16 @@ Static Private Sub InitComponent(sFile As String) Else If sKey = "Alpha" Then .State = UNSTABLE Else If sKey = "State" Then - .State = CInt(sLig) + Select Case LCase(sLig) + Case "stable", "finished" + .State = STABLE + Case "notfinished" + .State = STABLE_NOT_FINISHED + Case "experimental", "unstable" + .State = UNSTABLE + Default + .State = CInt(sLig) + End Select Else If sKey = "Version" Then .Version = sLig Else If sKey = "Hidden" Then diff --git a/comp/src/gb.chart/.component b/comp/src/gb.chart/.component index 10f0948ab..edb02e15f 100644 --- a/comp/src/gb.chart/.component +++ b/comp/src/gb.chart/.component @@ -6,4 +6,3 @@ Authors=Fabien Bodard Needs=Form Requires=gb.form -[Change] diff --git a/comp/src/gb.chart/.directory b/comp/src/gb.chart/.directory index 938e79006..06dab1c8a 100644 --- a/comp/src/gb.chart/.directory +++ b/comp/src/gb.chart/.directory @@ -1,8 +1,2 @@ [Desktop Entry] Icon=./.icon.png - -[Dolphin] -Timestamp=2010,3,25,15,8,6 - -[Settings] -ShowDotFiles=true diff --git a/comp/src/gb.chart/.icon.png b/comp/src/gb.chart/.icon.png index f66c374b9..8748600ba 100644 Binary files a/comp/src/gb.chart/.icon.png and b/comp/src/gb.chart/.icon.png differ diff --git a/comp/src/gb.eval.highlight/.component b/comp/src/gb.eval.highlight/.component index 3d21ac7f7..f586b765a 100644 --- a/comp/src/gb.eval.highlight/.component +++ b/comp/src/gb.eval.highlight/.component @@ -1,6 +1,5 @@ [Component] Key=gb.eval.highlight -Version=0.0.4 -State=1 +Version=0.0.62 Requires=gb.eval diff --git a/comp/src/gb.eval.highlight/.icon.png b/comp/src/gb.eval.highlight/.icon.png index f66c374b9..8748600ba 100644 Binary files a/comp/src/gb.eval.highlight/.icon.png and b/comp/src/gb.eval.highlight/.icon.png differ diff --git a/comp/src/gb.eval.highlight/.project b/comp/src/gb.eval.highlight/.project index 1f6be3403..eb3f0df40 100644 --- a/comp/src/gb.eval.highlight/.project +++ b/comp/src/gb.eval.highlight/.project @@ -2,7 +2,7 @@ # Compiled with Gambas 2.99.0 Title=gb.eval.highlight Startup=Main -Version=0.0.61 +Version=0.0.62 Component=gb.eval TabSize=2 MakeComponent=1 diff --git a/comp/src/gb.eval.highlight/.settings b/comp/src/gb.eval.highlight/.settings index 27028dd88..b2090aaa3 100644 --- a/comp/src/gb.eval.highlight/.settings +++ b/comp/src/gb.eval.highlight/.settings @@ -12,11 +12,11 @@ SearchComment=False SearchString=True [OpenFile] +Active=1 File[1]=".src/Highlight.class:30.21" File[2]=".src/HighlightHTML.module:67.0" File[3]=".src/Main.module:10.0" File[4]=".src/HighlightDiff.module:24.30" -Active=5 File[5]=".src/HighlightJavascript.module:142.17" Count=5 diff --git a/comp/src/gb.eval.highlight/.startup b/comp/src/gb.eval.highlight/.startup index 855b1134c..6247a6ab5 100644 --- a/comp/src/gb.eval.highlight/.startup +++ b/comp/src/gb.eval.highlight/.startup @@ -2,7 +2,7 @@ Main gb.eval.highlight 0 0 -0.0.61 +0.0.62 gb.eval diff --git a/gb.cairo/src/gb.cairo.component b/gb.cairo/src/gb.cairo.component index 0534a1c7f..57395df76 100644 --- a/gb.cairo/src/gb.cairo.component +++ b/gb.cairo/src/gb.cairo.component @@ -1,5 +1,4 @@ [Component] Key=gb.cairo Author=Benoît Minisini -State=1 Requires=gb.image \ No newline at end of file diff --git a/gb.image.imlib/src/gb.image.imlib.component b/gb.image.imlib/src/gb.image.imlib.component index 758475f03..bb9d093cc 100644 --- a/gb.image.imlib/src/gb.image.imlib.component +++ b/gb.image.imlib/src/gb.image.imlib.component @@ -1,5 +1,5 @@ [Component] Key=gb.image.imlib Author=Benoît Minisini -State=2 +State=NotFinished Requires=gb.image diff --git a/gb.pcre/src/gb.pcre.component b/gb.pcre/src/gb.pcre.component index bc2ffa71e..c0eaacf8b 100644 --- a/gb.pcre/src/gb.pcre.component +++ b/gb.pcre/src/gb.pcre.component @@ -4,4 +4,4 @@ Name=Perl-compatible Regular Expression Matching Name[fr]=Expressions rationnelles compatibles avec Perl Name[tr]=Perl-uyumlu Düzenli İfade Eşleme Author=Benoît Minisini,Rob Kudla -Alpha=1 +State=Stable diff --git a/gb.pcre/src/main.c b/gb.pcre/src/main.c index dc3cdc6dd..991afb5d6 100644 --- a/gb.pcre/src/main.c +++ b/gb.pcre/src/main.c @@ -32,7 +32,6 @@ #include "main.h" - GB_INTERFACE GB EXPORT; GB_DESC *GB_CLASSES[] EXPORT = @@ -43,17 +42,13 @@ GB_DESC *GB_CLASSES[] EXPORT = NULL }; - int EXPORT GB_INIT(void) { - REGEXP_init(); - return 0; } void EXPORT GB_EXIT() { - REGEXP_exit(); } diff --git a/gb.pcre/src/regexp.c b/gb.pcre/src/regexp.c index 5657eab21..b2159bf5c 100644 --- a/gb.pcre/src/regexp.c +++ b/gb.pcre/src/regexp.c @@ -1,23 +1,23 @@ /*************************************************************************** - regexp.c + regexp.c - (c) 2004 Rob Kudla - (c) 2000-2009 Benoît Minisini + (c) 2004 Rob Kudla + (c) 2000-2009 Benoît Minisini - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ***************************************************************************/ @@ -28,346 +28,252 @@ #include "regexp.h" #include "main.h" -static int init = 0; - -void REGEXP_init(void) -{ - init++; - if (init > 1) - return; -} - - -void REGEXP_exit(void) -{ - init--; - if (init > 0) - return; -} - - /*************************************************************************** - Regexp + Regexp ***************************************************************************/ -BEGIN_METHOD_VOID(CREGEXP_private_compile) +static void compile(void *_object) +{ + int errptr; + const char *errstr; - // fprintf(stderr, "debug 21\n"); - int errptr; - const char *errstr; + THIS->code = pcre_compile(THIS->pattern, THIS->copts, &errstr, &errptr, NULL); - // fprintf(stderr, "debug 22\n"); - // compile the pattern - // fprintf(stderr, "debug 22\n"); + if (!THIS->code) + GB.Error(errstr); +} - // fprintf(stderr, "debug 23\n"); +static void exec(void *_object) +{ + if (!THIS->code) + { + GB.Error("No pattern compiled yet"); + return; + } + + if (!THIS->subject) + { + GB.Error("No subject provided"); + return; + } - // fprintf(stderr, "debug 24\n"); - THIS->code = pcre_compile(THIS->pattern, THIS->copts, &errstr, &errptr, NULL); + THIS->count = pcre_exec(THIS->code, + NULL, + THIS->subject, + GB.StringLength(THIS->subject), + 0, + THIS->eopts, + THIS->ovector, + 99); + + // TODO: if count == 0, it means that ovector is too small, and count is 99/3 then. +} - // fprintf(stderr, "debug 25\n"); - if (THIS->code) { - THIS->compiled = 1; - // fprintf(stderr, "compiled OK\n"); - // fprintf(stderr, "compiled is %d\n", THIS->compiled); - } else { - GB.Error(errstr); - // fprintf(stderr, "didn't compile: %s\n", errstr); - } - // fprintf(stderr, "debug 26\n"); +static void return_match(void *_object, int index) +{ + if (index < 0 || index >= THIS->count) + { + GB.Error("Out of bounds"); + return; + } + + index *= 2; + GB.ReturnNewString(&THIS->subject[THIS->ovector[index]], THIS->ovector[index + 1] - THIS->ovector[index]); +} -END_METHOD - -BEGIN_METHOD_VOID(CREGEXP_private_exec) - - // fprintf(stderr, "debug 11\n"); - if (!THIS->code) { - GB.Error("No pattern compiled yet"); - // fprintf(stderr, "No pattern, compiled is %d\n", THIS->compiled); - return; - } - if (!THIS->subject) { - GB.Error("No subject provided"); - return; - } - - int *ovector = THIS->ovector; - - // fprintf(stderr, "debug 12\n"); - // fprintf(stderr, "debug 13\n"); - // do the actual match - // fprintf(stderr, "debug 14\n"); - THIS->rc = pcre_exec(THIS->code, - NULL, - THIS->subject, - strlen(THIS->subject), - 0, - THIS->eopts, - ovector, - 99); - - // fprintf(stderr, "debug 15\n"); - -END_METHOD - -BEGIN_METHOD(CREGEXP_compile, GB_STRING pattern; GB_INTEGER coptions) +BEGIN_METHOD(RegExp_Compile, GB_STRING pattern; GB_INTEGER coptions) THIS->copts = VARGOPT(coptions, 0); GB.FreeString(&THIS->pattern); THIS->pattern = GB.NewString(STRING(pattern), LENGTH(pattern)); - CALL_METHOD_VOID(CREGEXP_private_compile); + compile(THIS); END_METHOD -BEGIN_METHOD(CREGEXP_exec, GB_STRING subject; GB_INTEGER eoptions) + +BEGIN_METHOD(RegExp_Exec, GB_STRING subject; GB_INTEGER eoptions) THIS->eopts = VARGOPT(eoptions, 0); GB.FreeString(&THIS->subject); THIS->subject = GB.NewString(STRING(subject), LENGTH(subject)); - CALL_METHOD_VOID(CREGEXP_private_exec); + exec(THIS); END_METHOD -BEGIN_METHOD(CREGEXP_new, GB_STRING subject; GB_STRING pattern; GB_INTEGER coptions; GB_INTEGER eoptions) - GB.NewArray((void *) &(THIS->smcache), sizeof(*(THIS->smcache)), 0); // smcache is where i keep track of what to free later - THIS->compiled = 0; - THIS->ovector = NULL; - THIS->rc = 0; +BEGIN_METHOD(RegExp_new, GB_STRING subject; GB_STRING pattern; GB_INTEGER coptions; GB_INTEGER eoptions) - int *ovector = NULL; - // fprintf(stderr, "debug 11a\n"); - GB.Alloc((void *) &ovector, sizeof(int) * 99); - THIS->ovector = ovector; + GB.Alloc(POINTER(&THIS->ovector), sizeof(int) * 99); - // fprintf(stderr, "debug 1\n"); - if (MISSING(pattern)) { // the user didn't provide a pattern. + if (MISSING(pattern)) // the user didn't provide a pattern. + return; + + THIS->copts = VARGOPT(coptions, 0); + THIS->pattern = GB.NewString(STRING(pattern), LENGTH(pattern)); + + compile(THIS); + if (!THIS->code) // we didn't get a compiled pattern back. + return; + + if (MISSING(subject)) // the user didn't specify any subject text. + return; + + THIS->eopts = VARGOPT(eoptions, 0); + THIS->subject = GB.NewString(STRING(subject), LENGTH(subject)); + + exec(THIS); + +END_METHOD + + +BEGIN_METHOD_VOID(RegExp_free) + + GB.FreeString(&THIS->subject); + GB.FreeString(&THIS->pattern); + GB.Free(POINTER(&THIS->ovector)); + +END_METHOD + + +BEGIN_PROPERTY(RegExp_Pattern) + + GB.ReturnString(THIS->pattern); + +END_PROPERTY + + +BEGIN_PROPERTY(RegExp_Subject) + + GB.ReturnString(THIS->subject); + +END_PROPERTY + + +BEGIN_PROPERTY(RegExp_Offset) + + GB.ReturnInteger(THIS->ovector[0]); + +END_PROPERTY + + +BEGIN_PROPERTY(RegExp_Text) + + if (THIS->count == 0) + GB.ReturnNull(); + else + return_match(THIS, 0); + +END_PROPERTY + + +BEGIN_PROPERTY(RegExp_Submatches_Count) + + GB.ReturnInteger(THIS->count - 1); + +END_PROPERTY + + +BEGIN_METHOD(RegExp_Submatches_get, GB_INTEGER index) + + int index = VARG(index); + + if (index < 0 || index >= (THIS->count - 1)) + { + GB.Error("Out of bounds"); return; } - - // fprintf(stderr, "debug 2\n"); - if (MISSING(coptions)) { // the user didn't provide any execute options. - THIS->copts = 0; - } else { - THIS->copts = VARG(coptions); - } - -if (THIS->pattern) { - GB.FreeString(&THIS->pattern); -} - THIS->pattern = GB.NewString(STRING(pattern), LENGTH(pattern)); - - // fprintf(stderr, "debug 3\n"); - CALL_METHOD_VOID(CREGEXP_private_compile); -// CREGEXP_compile(ARG(pattern), ARG(coptions)); - // fprintf(stderr, "compiled is %d\n", THIS->compiled); - - // fprintf(stderr, "debug 4\n"); - if (!THIS->code) { // we didn't get a compiled pattern back. - return; - } - - // fprintf(stderr, "debug 5\n"); - if (MISSING(subject)) { // the user didn't specify any subject text. - return; - } - - // fprintf(stderr, "compiled is %d\n", THIS->compiled); - // fprintf(stderr, "debug 6\n"); - if (MISSING(eoptions)) { // the user didn't provide any execute options. - THIS->eopts = 0; - } else { - THIS->eopts = VARG(eoptions); - } - -if (THIS->subject) { - GB.FreeString(&THIS->subject); -} - THIS->subject = GB.NewString(STRING(subject), LENGTH(subject)); - - // fprintf(stderr, "debug 7\n"); - // fprintf(stderr, "compiled is %d\n", THIS->compiled); -// fprintf(stderr, "Subject contains %s\n", THIS->subject); - CALL_METHOD_VOID(CREGEXP_private_exec); - // fprintf(stderr, "debug 8\n"); - // fprintf(stderr, "debug 9\n"); - return; - // fprintf(stderr, "debug 10\n"); + + THIS->_submatch = index; + RETURN_SELF(); END_METHOD -BEGIN_METHOD_VOID(CREGEXP_free) - GB.FreeString(&(THIS->subject)); - GB.FreeString(&(THIS->pattern)); - int i = 0; - for (i = 0; i < GB.Count(THIS->smcache); i++) { - GB.FreeString(&(THIS->smcache[i])); - } - GB.FreeArray((void *) &(THIS->smcache)); - GB.Free((void *) &(THIS->ovector)); +BEGIN_PROPERTY(RegExp_Submatch_Text) -END_METHOD - -BEGIN_PROPERTY(CREGEXP_Offset) - - GB.ReturnInteger((THIS->ovector)[0]); + return_match(THIS, THIS->_submatch + 1); END_PROPERTY -BEGIN_PROPERTY(CREGEXPSUBMATCH_Count) - GB.ReturnInteger(THIS->rc - 1); +BEGIN_PROPERTY(RegExp_Submatch_Offset) + + GB.ReturnInteger(THIS->ovector[2 * (THIS->_submatch + 1)]); END_PROPERTY -BEGIN_PROPERTY(CREGEXP_Text) - - const char *substring_start = THIS->subject + (THIS->ovector)[0]; - int substring_length = (THIS->ovector)[1] - (THIS->ovector)[0]; - char *str; - - *(char **)GB.Add((void *)&(THIS->smcache)) = str = GB.NewString(substring_start, substring_length); - GB.ReturnString(str); - -END_PROPERTY - -BEGIN_PROPERTY(CREGEXPSUBMATCH_Text) - - int i = THIS->_submatch; - int *ovector = THIS->ovector; - int rc = THIS->rc; - const char *str = NULL; - char *submatch = NULL; - char **tmp = NULL; - - if (i < rc) { - pcre_get_substring(THIS->subject, ovector, rc, i, &str); - submatch = GB.NewZeroString(str); - tmp = (char **) GB.Add((void *) &(THIS->smcache)); - *tmp = submatch; - pcre_free_substring(str); - } else { - GB.Error("Submatch index out of bounds"); - return; - } - - GB.ReturnString(submatch); - return; - -END_PROPERTY - -BEGIN_PROPERTY(CREGEXPSUBMATCHES_count) - - GB.ReturnInteger(THIS->rc - 1); - -END_PROPERTY - -BEGIN_PROPERTY(CREGEXPSUBMATCH_Offset) - - int i = THIS->_submatch; - int *ovector = THIS->ovector; - int rc = THIS->rc; - - if (i < rc) { - GB.ReturnInteger(ovector[2*i]); - } else { - GB.Error("Submatch index out of bounds"); - return; - } - - return; - -END_PROPERTY - -BEGIN_METHOD(CREGEXPSUBMATCHES_get, GB_INTEGER index) - - int i = VARG(index); - int rc = THIS->rc; - - if (i < rc && i >= 0) { - THIS->_submatch = i; - RETURN_SELF(); - } else { - GB.Error("Submatch index out of bounds"); - return; - } - -END_METHOD - -BEGIN_PROPERTY(CREGEXP_submatches) - - RETURN_SELF(); - -END_METHOD GB_DESC CRegexpDesc[] = { - GB_DECLARE("Regexp", sizeof(CREGEXP)), + GB_DECLARE("Regexp", sizeof(CREGEXP)), - GB_METHOD("_new", NULL, CREGEXP_new, "[(Subject)s(Pattern)s(CompileOptions)i(ExecOptions)i]"), - GB_METHOD("_free", NULL, CREGEXP_free, NULL), - GB_METHOD("Compile", NULL, CREGEXP_compile, "(Pattern)s[(CompileOptions)i]"), - GB_METHOD("Exec", NULL, CREGEXP_exec, "(Subject)s[(ExecOptions)i]"), - GB_CONSTANT("Caseless", "i", PCRE_CASELESS), - GB_CONSTANT("MultiLine", "i", PCRE_MULTILINE), - GB_CONSTANT("DotAll", "i", PCRE_DOTALL), - GB_CONSTANT("Extended", "i", PCRE_EXTENDED), - GB_CONSTANT("Anchored", "i", PCRE_ANCHORED), - GB_CONSTANT("DollarEndOnly", "i", PCRE_DOLLAR_ENDONLY), - GB_CONSTANT("Extra", "i", PCRE_EXTRA), - GB_CONSTANT("NotBOL", "i", PCRE_NOTBOL), - GB_CONSTANT("NotEOL", "i", PCRE_NOTEOL), - GB_CONSTANT("Ungreedy", "i", PCRE_UNGREEDY), - GB_CONSTANT("NotEmpty", "i", PCRE_NOTEMPTY), - GB_CONSTANT("UTF8", "i", PCRE_UTF8), - GB_CONSTANT("NoAutoCapture", "i", PCRE_NO_AUTO_CAPTURE), - GB_CONSTANT("NoUTF8Check", "i", PCRE_NO_UTF8_CHECK), - GB_CONSTANT("NoMatch", "i", PCRE_ERROR_NOMATCH), - GB_CONSTANT("Null", "i", PCRE_ERROR_NULL), - GB_CONSTANT("BadOption", "i", PCRE_ERROR_BADOPTION), - GB_CONSTANT("BadMagic", "i", PCRE_ERROR_BADMAGIC), - GB_CONSTANT("UnknownNode", "i", PCRE_ERROR_UNKNOWN_NODE), - GB_CONSTANT("NoMemory", "i", PCRE_ERROR_NOMEMORY), - GB_CONSTANT("NoSubstring", "i", PCRE_ERROR_NOSUBSTRING), - GB_CONSTANT("MatchLimit", "i", PCRE_ERROR_MATCHLIMIT), - GB_CONSTANT("Callout", "i", PCRE_ERROR_CALLOUT), - GB_CONSTANT("BadUTF8", "i", PCRE_ERROR_BADUTF8), + GB_METHOD("_new", NULL, RegExp_new, "[(Subject)s(Pattern)s(CompileOptions)i(ExecOptions)i]"), + GB_METHOD("_free", NULL, RegExp_free, NULL), + + GB_METHOD("Compile", NULL, RegExp_Compile, "(Pattern)s[(CompileOptions)i]"), + GB_METHOD("Exec", NULL, RegExp_Exec, "(Subject)s[(ExecOptions)i]"), + + GB_CONSTANT("Caseless", "i", PCRE_CASELESS), + GB_CONSTANT("MultiLine", "i", PCRE_MULTILINE), + GB_CONSTANT("DotAll", "i", PCRE_DOTALL), + GB_CONSTANT("Extended", "i", PCRE_EXTENDED), + GB_CONSTANT("Anchored", "i", PCRE_ANCHORED), + GB_CONSTANT("DollarEndOnly", "i", PCRE_DOLLAR_ENDONLY), + GB_CONSTANT("Extra", "i", PCRE_EXTRA), + GB_CONSTANT("NotBOL", "i", PCRE_NOTBOL), + GB_CONSTANT("NotEOL", "i", PCRE_NOTEOL), + GB_CONSTANT("Ungreedy", "i", PCRE_UNGREEDY), + GB_CONSTANT("NotEmpty", "i", PCRE_NOTEMPTY), + GB_CONSTANT("UTF8", "i", PCRE_UTF8), + GB_CONSTANT("NoAutoCapture", "i", PCRE_NO_AUTO_CAPTURE), + GB_CONSTANT("NoUTF8Check", "i", PCRE_NO_UTF8_CHECK), + GB_CONSTANT("NoMatch", "i", PCRE_ERROR_NOMATCH), + GB_CONSTANT("Null", "i", PCRE_ERROR_NULL), + GB_CONSTANT("BadOption", "i", PCRE_ERROR_BADOPTION), + GB_CONSTANT("BadMagic", "i", PCRE_ERROR_BADMAGIC), + GB_CONSTANT("UnknownNode", "i", PCRE_ERROR_UNKNOWN_NODE), + GB_CONSTANT("NoMemory", "i", PCRE_ERROR_NOMEMORY), + GB_CONSTANT("NoSubstring", "i", PCRE_ERROR_NOSUBSTRING), + GB_CONSTANT("MatchLimit", "i", PCRE_ERROR_MATCHLIMIT), + GB_CONSTANT("Callout", "i", PCRE_ERROR_CALLOUT), + GB_CONSTANT("BadUTF8", "i", PCRE_ERROR_BADUTF8), #if (((PCRE_MAJOR == 4) && (PCRE_MINOR < 5)) || (PCRE_MAJOR < 4)) - GB_CONSTANT("BadUTF8Offset", "i", 65535), /* PCRE_ERROR_BADUTF8_OFFSET not defined < 4.5 */ + GB_CONSTANT("BadUTF8Offset", "i", 65535), /* PCRE_ERROR_BADUTF8_OFFSET not defined < 4.5 */ #else - GB_CONSTANT("BadUTF8Offset", "i", PCRE_ERROR_BADUTF8_OFFSET), + GB_CONSTANT("BadUTF8Offset", "i", PCRE_ERROR_BADUTF8_OFFSET), #endif - //GB_METHOD("SubMatch", ".RegexpSubmatches", CREGEXP_submatch, "(Index)i"), - GB_PROPERTY_SELF("SubMatches", ".RegExpSubmatches"), - GB_PROPERTY_READ("Text", "s", CREGEXP_Text), /* this is the string matched by the entire pattern */ - GB_PROPERTY_READ("Offset", "i", CREGEXP_Offset), /* this is the string matched by the entire pattern */ - GB_END_DECLARE + GB_PROPERTY_SELF("SubMatches", ".RegExpSubmatches"), + + GB_PROPERTY_READ("Text", "s", RegExp_Text), /* this is the string matched by the entire pattern */ + GB_PROPERTY_READ("Offset", "i", RegExp_Offset), /* this is the string matched by the entire pattern */ + GB_PROPERTY_READ("Pattern", "s", RegExp_Pattern), + GB_PROPERTY_READ("Subject", "s", RegExp_Subject), + + GB_END_DECLARE }; GB_DESC CRegexpSubmatchesDesc[] = { - GB_DECLARE(".RegexpSubmatches", 0), GB_VIRTUAL_CLASS(), + GB_DECLARE(".RegexpSubmatches", 0), GB_VIRTUAL_CLASS(), - GB_METHOD("_get", ".RegexpSubmatch", CREGEXPSUBMATCHES_get, "(Index)i"), - GB_PROPERTY_READ("Count", "i", CREGEXPSUBMATCHES_count), + GB_METHOD("_get", ".RegexpSubmatch", RegExp_Submatches_get, "(Index)i"), + GB_PROPERTY_READ("Count", "i", RegExp_Submatches_Count), - GB_END_DECLARE + GB_END_DECLARE }; GB_DESC CRegexpSubmatchDesc[] = { - GB_DECLARE(".RegexpSubmatch", 0), GB_VIRTUAL_CLASS(), + GB_DECLARE(".RegexpSubmatch", 0), GB_VIRTUAL_CLASS(), - GB_PROPERTY_READ("Offset", "i", CREGEXPSUBMATCH_Offset), - GB_PROPERTY_READ("Text", "s", CREGEXPSUBMATCH_Text), - GB_PROPERTY_READ("Count", "i", CREGEXPSUBMATCH_Count), + GB_PROPERTY_READ("Offset", "i", RegExp_Submatch_Offset), + GB_PROPERTY_READ("Text", "s", RegExp_Submatch_Text), - GB_END_DECLARE + GB_END_DECLARE }; diff --git a/gb.pcre/src/regexp.h b/gb.pcre/src/regexp.h index fde72e21b..5e88f9bec 100644 --- a/gb.pcre/src/regexp.h +++ b/gb.pcre/src/regexp.h @@ -37,26 +37,22 @@ extern GB_DESC CRegexpSubmatchDesc[]; #else typedef -struct { - GB_BASE ob; - char *subject; - char *pattern; - int *ovector; - int rc; - int compiled; - int eopts; - int copts; - pcre *code; - char **smcache; - int _submatch; -} -CREGEXP; + struct + { + GB_BASE ob; + char *subject; + char *pattern; + int *ovector; + int count; + int eopts; + int copts; + pcre *code; + int _submatch; + } + CREGEXP; -#define THIS OBJECT(CREGEXP) +#define THIS OBJECT(CREGEXP) #endif -void REGEXP_init(void); -void REGEXP_exit(void); - #endif diff --git a/gb.qt4/src/webkit/gb.qt4.webkit.component b/gb.qt4/src/webkit/gb.qt4.webkit.component index 7d2a20d4f..da81aa827 100644 --- a/gb.qt4/src/webkit/gb.qt4.webkit.component +++ b/gb.qt4/src/webkit/gb.qt4.webkit.component @@ -3,7 +3,7 @@ Key=gb.qt4.webkit Author=Benoît Minisini Type=Form Require=gb.qt4 -State=2 +State=NotFinished [Form] Control=WebView diff --git a/main/lib/vb/gb.vb.component b/main/lib/vb/gb.vb.component index 8d7472745..35845d628 100644 --- a/main/lib/vb/gb.vb.component +++ b/main/lib/vb/gb.vb.component @@ -1,10 +1,6 @@ [Component] Key=gb.vb Name=Visual Basic compatibility -Name[fr]=Compatibilité avec Visual Basic -Name[pl]=Komponent zgodności z Visual Basic -Name[es]=Compatibilidad con Visual Basic -Name[tr]=Visual Basic uyumluluğu Author=Benoît Minisini,Daniel Campos Fernández,Nigel Gerrard -Alpha=1 +