aboutsummaryrefslogtreecommitdiff
path: root/gconf
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-16 13:09:28 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-16 13:09:28 +0200
commitb0f10ec7274144b4e048953b11f2a4d98e055810 (patch)
tree4bcc06122d183582d0b53fe2b8ba4c87b289b96f /gconf
parent169a680208f2de8f92b4a2a4977953d4452e981f (diff)
downloadwydawca-b0f10ec7274144b4e048953b11f2a4d98e055810.tar.gz
wydawca-b0f10ec7274144b4e048953b11f2a4d98e055810.tar.bz2
Improve argument parsing
* src/cmdline.opt, src/getopt.m4: New files. * src/wydawca.c: Switch to new way of command line parsing. * src/wydawca.h (gettext): Define. * bootstrap.conf: Add formatting flags for gconf_warning and gconf_error * gconf-preproc.c (pp_list_find): Minor change. * gconf/gconf.h (gconf_warning,gconf_error): Mark as printflike. * src/.gitignore: Add cmdline.h * src/Makefile.am (wydawca_SOURCES): Add cmdline.h. (.opt.h): New rule. * src/config.c (cb_archive): Archive is now a block statement (unless type "none" is declared). (all functions): Tighten input checking * src/update-2.0.awk: Reflect the above change. * src/directive.c (process_directives): Minor change. * src/diskio.c (symlink_file): Minor change.
Diffstat (limited to 'gconf')
-rw-r--r--gconf/gconf-preproc.c5
-rw-r--r--gconf/gconf.h6
2 files changed, 6 insertions, 5 deletions
diff --git a/gconf/gconf-preproc.c b/gconf/gconf-preproc.c
index af26d1a..eb50474 100644
--- a/gconf/gconf-preproc.c
+++ b/gconf/gconf-preproc.c
@@ -258,7 +258,7 @@ pp_list_find (gl_list_t list, struct file_data *dptr)
const void *p;
gl_list_iterator_t itr = gl_list_iterator (list);
- while (gl_list_iterator_next (&itr, &p, NULL))
+ while (!dptr->found && gl_list_iterator_next (&itr, &p, NULL))
{
const char *dir = p;
size_t size = strlen (dir) + 1 + dptr->namelen + 1;
@@ -270,8 +270,7 @@ pp_list_find (gl_list_t list, struct file_data *dptr)
strcpy (dptr->buf, dir);
strcat (dptr->buf, "/");
strcat (dptr->buf, dptr->name);
- if (dptr->found = (access (dptr->buf, F_OK) == 0))
- break;
+ dptr->found = access (dptr->buf, F_OK) == 0;
}
gl_list_iterator_free (&itr);
return dptr->found;
diff --git a/gconf/gconf.h b/gconf/gconf.h
index 8c04b6d..f88e87a 100644
--- a/gconf/gconf.h
+++ b/gconf/gconf.h
@@ -101,8 +101,10 @@ gconf_value_t *gconf_value_dup(gconf_value_t *input);
extern void gconf_print_diag(gconf_locus_t *, int, int, const char*);
-void gconf_warning(gconf_locus_t *locus, int errcode, const char *fmt, ...);
-void gconf_error(gconf_locus_t *locus, int errcode, const char *fmt, ...);
+void gconf_warning(gconf_locus_t *locus, int errcode, const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+void gconf_error(gconf_locus_t *locus, int errcode, const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
void gconf_set_keywords(struct gconf_keyword *kwd);
void gconf_gram_trace(int n);
void gconf_lex_trace (int n);

Return to:

Send suggestions and report system problems to the System administrator.