Enlightenment CVS committal
Author : andreas99
Project : e16
Module : tools
Dir : e16/tools/e16menuedit2/src
Modified Files:
file.c file.h
Log Message:
version change
===================================================================
RCS file: /cvsroot/enlightenment/e16/tools/e16menuedit2/src/file.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- file.c 10 Jan 2005 15:13:57 -0000 1.15
+++ file.c 15 Jan 2005 10:27:09 -0000 1.16
@@ -54,17 +54,33 @@
((getenv ("TMPDIR") == NULL) ? "/tmp" : getenv ("TMPDIR")));
}
-int compile_regex ()
+void compile_regex ()
{
int status;
+ char err_buf[ERR_BUF_SIZE];
char pattern_mark[] = "\"([^\"]*)\"[[:space:]]*";
char pattern_char[] = "([^[[:space:]]*)[[:space:]]*";
char pattern_space[] = "[[:space:]]*(.*)";
status = regcomp (&gv.re_mark, pattern_mark, REG_EXTENDED);
+ if (status != 0)
+ {
+ regerror (status, &gv.re_mark, err_buf, (size_t) ERR_BUF_SIZE);
+ printf ("regex compile: %s\n", err_buf);
+ }
status = regcomp (&gv.re_char, pattern_char, REG_EXTENDED);
+ if (status != 0)
+ {
+ regerror (status, &gv.re_mark, err_buf, (size_t) ERR_BUF_SIZE);
+ printf ("regex compile: %s\n", err_buf);
+ }
status = regcomp (&gv.re_space, pattern_space, REG_EXTENDED);
+ if (status != 0)
+ {
+ regerror (status, &gv.re_mark, err_buf, (size_t) ERR_BUF_SIZE);
+ printf ("regex compile: %s\n", err_buf);
+ }
gv.pattern_mark = strdup (pattern_mark);
gv.pattern_char = strdup (pattern_char);
@@ -77,7 +93,7 @@
int numsub = 0;
int maxsub = 1;
int status;
- char err_buf[1024];
+ char err_buf[ERR_BUF_SIZE];
char **data;
int i, n;
@@ -86,7 +102,6 @@
*data_ptr = data;
line = strdup (line);
- printf ("%s\n", line);
/* cut spaces */
if (line[0] == ' ')
@@ -120,7 +135,7 @@
&ss, maxsub, &numsub);
if (status != 0)
{
- regerror (status, &gv.re_mark, err_buf, (size_t) 1024);
+ regerror (status, &gv.re_mark, err_buf, (size_t) ERR_BUF_SIZE);
printf ("regex exec: %s\n", err_buf);
}
@@ -140,8 +155,6 @@
free (ss[i].end);
}
free (ss);
-
- printf ("match \": %s\n", data[n]);
}
else if (line[0] != ' ')
{
@@ -149,7 +162,7 @@
&ss, maxsub, &numsub);
if (status != 0)
{
- regerror (status, &gv.re_char, err_buf, (size_t) 1024);
+ regerror (status, &gv.re_char, err_buf, (size_t) ERR_BUF_SIZE);
printf ("regex exec: %s\n", err_buf);
}
@@ -169,8 +182,6 @@
free (ss[i].end);
}
free (ss);
-
- printf ("match char: %s\n", data[n]);
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/tools/e16menuedit2/src/file.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- file.h 9 Jan 2005 20:53:51 -0000 1.10
+++ file.h 15 Jan 2005 10:27:09 -0000 1.11
@@ -45,6 +45,8 @@
#include "e16menuedit2.h"
#include "regex_func.h"
+#define ERR_BUF_SIZE 1024
+
char *field (char *s, int field);
void fword (char *s, int num, char *wd);
char *homedir (int uid);
@@ -56,7 +58,7 @@
char *e16_version ();
char *get_fallback_locale (char *locale);
int run_help (char *help_app, char* help_dir, char *help_file);
-int compile_regex ();
+void compile_regex ();
int menu_regex (char *line, gchar ***data_ptr);
#endif /* _FILE_H */
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs