Enlightenment CVS committal Author : lordchaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/lib Modified Files: libevfs.c Log Message: * Fixed an off-by-one error in the lexer. This is just a hack currently, to detect when we go over the string boundary. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/lib/libevfs.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- libevfs.c 20 Nov 2005 01:27:24 -0000 1.24 +++ libevfs.c 20 Nov 2005 23:23:36 -0000 1.25 @@ -236,7 +236,7 @@ ecore_list_goto_first(plugin); while ( (cmp = ecore_list_next(plugin))) { if (!strncmp(tmp_tok, cmp, strlen(cmp)) ) { - // printf("Found token (keyword) %s, added %d to l_uri\n", cmp, strlen(cmp)); + //printf("Found token (keyword) %s, added %d to l_uri\n", cmp, strlen(cmp)); l_uri += strlen(cmp); i = 0; @@ -254,10 +254,14 @@ if (solid_alpha && !new_alpha) { strncpy(tmp_tok, l_uri, i); + + /*There is a lexer position bug for now- this will fix it FIXME*/ + if (tmp_tok[0] == '\0') goto lexer_done; + tmp_tok[i] = '\0'; /*printf ("Looks like a string..\n");*/ - //printf("Found string: '%s'\n", tmp_tok); + //printf("Found string: '%s', i is %d, j is %d, strlen(dup_uri) is %d\n", tmp_tok,i,j,strlen(dup_uri)); token = NEW(evfs_uri_token); token->token_s = strdup(tmp_tok); @@ -280,11 +284,11 @@ else j+=len; i++; - //printf("i:J (%d:%d)\n", i,j); + //printf("i:J (%d:%d) - %d\n", i,j,strlen(dup_uri)); } + lexer_done: free(dup_uri); - return tokens; } ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs