[Xfce4-commits] <squeeze:master> pcre and scanf parsers fixes and optimazations
Peter de Ridder
noreply at xfce.org
Sat Sep 10 21:52:03 CEST 2011
Updating branch refs/heads/master
to 16ac559fa3c66dd607c62cf9d42dad66fd38e693 (commit)
from 8a92da6118ae34fb9f855f85d2d7fc99ae62486d (commit)
commit 16ac559fa3c66dd607c62cf9d42dad66fd38e693
Author: Peter de Ridder <peter at xfce.org>
Date: Sat Sep 10 21:45:21 2011 +0200
pcre and scanf parsers fixes and optimazations
libsqueeze/pcre-parser.c | 4 ++--
libsqueeze/scanf-parser.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libsqueeze/pcre-parser.c b/libsqueeze/pcre-parser.c
index 892c8f7..46f4edc 100644
--- a/libsqueeze/pcre-parser.c
+++ b/libsqueeze/pcre-parser.c
@@ -206,7 +206,6 @@ build_parser ( LSQPcreParser *parser, const gchar *parser_string, gchar **parser
int error_pos;
gint i = 0;
gchar **iter;
- gchar *name;
/* TODO: Should we use g_strstr instead? */
/* If we want to support multiline matching without the (?m) flag we need to remove the starting lines one by one if no match was found.
@@ -247,6 +246,7 @@ build_parser ( LSQPcreParser *parser, const gchar *parser_string, gchar **parser
for ( iter = parser_types; *iter; ++iter, ++i)
{
+ gchar *name;
gchar *ptr;
GType type = G_TYPE_INVALID;
type_parser *type_iter;
@@ -256,7 +256,7 @@ build_parser ( LSQPcreParser *parser, const gchar *parser_string, gchar **parser
SIZE_SHORT,
SIZE_LONG,
SIZE_LONGLONG
- } size_flag;
+ } size_flag = SIZE_NORMAL;
type_iter = &parser->types_list[i];
diff --git a/libsqueeze/scanf-parser.c b/libsqueeze/scanf-parser.c
index 4de8f23..5159f56 100644
--- a/libsqueeze/scanf-parser.c
+++ b/libsqueeze/scanf-parser.c
@@ -185,7 +185,7 @@ static guint skip_char(gchar *str, guint lng, parse_part *part, LSQScanfParserCo
if(!delim && !part->next)
delim = "\n";
- if(!delim)
+ if(!delim[0])
return 1;
//for(ptr = str; g_ascii_isspace(*ptr); ptr++);
More information about the Xfce4-commits
mailing list