diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/cmdline.opt | 18 | ||||
-rw-r--r-- | src/config.c | 476 | ||||
-rw-r--r-- | src/diskio.c | 8 | ||||
-rw-r--r-- | src/tcpwrap.c | 22 | ||||
-rw-r--r-- | src/wydawca.c | 10 | ||||
-rw-r--r-- | src/wydawca.h | 14 |
7 files changed, 276 insertions, 276 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 993ce0d..c96fbcb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -58,8 +58,8 @@ SUFFIXES=.opt .c .h | |||
58 | incdir=$(pkgdatadir)/$(VERSION)/include | 58 | incdir=$(pkgdatadir)/$(VERSION)/include |
59 | inc_DATA = $(PP_SETUP_FILE) | 59 | inc_DATA = $(PP_SETUP_FILE) |
60 | 60 | ||
61 | LDADD=../gconf/libgconf.a ../gnu/libgnu.a @SQLLIB@ @GPGMELIB@ @MAILUTILS_LIBS@ | 61 | LDADD=../grecs/src/libgrecs.a ../gnu/libgnu.a @SQLLIB@ @GPGMELIB@ @MAILUTILS_LIBS@ |
62 | INCLUDES = -I$(top_srcdir)/gconf -I$(top_srcdir)/gnu -I../gnu @MAILUTILS_INCLUDES@ | 62 | INCLUDES = -I$(top_srcdir)/grecs/src/ -I$(top_srcdir)/gnu -I../gnu @MAILUTILS_INCLUDES@ |
63 | AM_CPPFLAGS= \ | 63 | AM_CPPFLAGS= \ |
64 | -DSYSCONFDIR=\"$(sysconfdir)\"\ | 64 | -DSYSCONFDIR=\"$(sysconfdir)\"\ |
65 | -DLOCALSTATEDIR=\"$(localstatedir)\"\ | 65 | -DLOCALSTATEDIR=\"$(localstatedir)\"\ |
diff --git a/src/cmdline.opt b/src/cmdline.opt index fd87e5e..3515072 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt | |||
@@ -133,7 +133,7 @@ GROUP(Preprocessor control) | |||
133 | OPTION(include-directory,I,DIR, | 133 | OPTION(include-directory,I,DIR, |
134 | [<add include directory>]) | 134 | [<add include directory>]) |
135 | BEGIN | 135 | BEGIN |
136 | gconf_preproc_add_include_dir (optarg); | 136 | grecs_preproc_add_include_dir (optarg); |
137 | END | 137 | END |
138 | 138 | ||
139 | OPTION(define,D,SYMBOL[=VALUE], | 139 | OPTION(define,D,SYMBOL[=VALUE], |
@@ -159,13 +159,13 @@ END | |||
159 | OPTION(preprocessor,,COMMAND, | 159 | OPTION(preprocessor,,COMMAND, |
160 | [<use COMMAND instead of the default preprocessor>]) | 160 | [<use COMMAND instead of the default preprocessor>]) |
161 | BEGIN | 161 | BEGIN |
162 | gconf_preprocessor = optarg; | 162 | grecs_preprocessor = optarg; |
163 | END | 163 | END |
164 | 164 | ||
165 | OPTION(no-preprocessor,,, | 165 | OPTION(no-preprocessor,,, |
166 | [<disable preprocessing>]) | 166 | [<disable preprocessing>]) |
167 | BEGIN | 167 | BEGIN |
168 | gconf_preprocessor = NULL; | 168 | grecs_preprocessor = NULL; |
169 | END | 169 | END |
170 | 170 | ||
171 | GROUP(Debugging) | 171 | GROUP(Debugging) |
@@ -179,13 +179,13 @@ END | |||
179 | OPTION(dump-grammar-trace,,, | 179 | OPTION(dump-grammar-trace,,, |
180 | [<dump configuration grammar traces>]) | 180 | [<dump configuration grammar traces>]) |
181 | BEGIN | 181 | BEGIN |
182 | gconf_gram_trace (1); | 182 | grecs_gram_trace (1); |
183 | END | 183 | END |
184 | 184 | ||
185 | OPTION(dump-lex-trace,,, | 185 | OPTION(dump-lex-trace,,, |
186 | [<dump lexical analyzer traces>]) | 186 | [<dump lexical analyzer traces>]) |
187 | BEGIN | 187 | BEGIN |
188 | gconf_lex_trace (1); | 188 | grecs_lex_trace (1); |
189 | END | 189 | END |
190 | 190 | ||
191 | GROUP([<Additional help>]) | 191 | GROUP([<Additional help>]) |
@@ -202,13 +202,13 @@ void | |||
202 | parse_options(int argc, char *argv[]) | 202 | parse_options(int argc, char *argv[]) |
203 | { | 203 | { |
204 | GETOPT(argc, argv) | 204 | GETOPT(argc, argv) |
205 | if (pp_cmd_stack_init && gconf_preprocessor) | 205 | if (pp_cmd_stack_init && grecs_preprocessor) |
206 | { | 206 | { |
207 | char *defs = obstack_finish (&pp_cmd_stack); | 207 | char *defs = obstack_finish (&pp_cmd_stack); |
208 | char *cmd = xmalloc (strlen (gconf_preprocessor) + strlen (defs) + 1); | 208 | char *cmd = xmalloc (strlen (grecs_preprocessor) + strlen (defs) + 1); |
209 | strcpy (cmd, gconf_preprocessor); | 209 | strcpy (cmd, grecs_preprocessor); |
210 | strcat (cmd, defs); | 210 | strcat (cmd, defs); |
211 | gconf_preprocessor = cmd; | 211 | grecs_preprocessor = cmd; |
212 | obstack_free (&pp_cmd_stack, NULL); | 212 | obstack_free (&pp_cmd_stack, NULL); |
213 | } | 213 | } |
214 | } | 214 | } |
diff --git a/src/config.c b/src/config.c index 11ac92d..60b5792 100644 --- a/src/config.c +++ b/src/config.c | |||
@@ -127,18 +127,18 @@ int | |||
127 | string_to (const char *what, const char *str, | 127 | string_to (const char *what, const char *str, |
128 | const char **args, int *vals, | 128 | const char **args, int *vals, |
129 | int *pret, | 129 | int *pret, |
130 | gconf_locus_t *locus) | 130 | grecs_locus_t *locus) |
131 | { | 131 | { |
132 | ptrdiff_t x = ARGMATCH (str, args, vals); | 132 | ptrdiff_t x = ARGMATCH (str, args, vals); |
133 | 133 | ||
134 | if (x == (ptrdiff_t)-1) | 134 | if (x == (ptrdiff_t)-1) |
135 | { | 135 | { |
136 | gconf_error (locus, 0, _("unknown %s: %s"), what, str); | 136 | grecs_error (locus, 0, _("unknown %s: %s"), what, str); |
137 | return 1; | 137 | return 1; |
138 | } | 138 | } |
139 | else if (x == (ptrdiff_t)-2) | 139 | else if (x == (ptrdiff_t)-2) |
140 | { | 140 | { |
141 | gconf_error (locus, 0, _("ambiguous %s: %s"), what, str); | 141 | grecs_error (locus, 0, _("ambiguous %s: %s"), what, str); |
142 | return 1; | 142 | return 1; |
143 | } | 143 | } |
144 | *pret = vals[x]; | 144 | *pret = vals[x]; |
@@ -169,7 +169,7 @@ notification_event_str (enum notification_event evt) | |||
169 | } | 169 | } |
170 | 170 | ||
171 | int | 171 | int |
172 | string_to_notification_event (gconf_locus_t *locus, const char *val, | 172 | string_to_notification_event (grecs_locus_t *locus, const char *val, |
173 | enum notification_event *pret) | 173 | enum notification_event *pret) |
174 | { | 174 | { |
175 | int rc, res; | 175 | int rc, res; |
@@ -203,7 +203,7 @@ notification_target_str (enum notification_target tgt) | |||
203 | } | 203 | } |
204 | 204 | ||
205 | int | 205 | int |
206 | string_to_notification_target (gconf_locus_t *locus, const char *val, | 206 | string_to_notification_target (grecs_locus_t *locus, const char *val, |
207 | enum notification_target *pret) | 207 | enum notification_target *pret) |
208 | { | 208 | { |
209 | int rc, res; | 209 | int rc, res; |
@@ -217,35 +217,35 @@ string_to_notification_target (gconf_locus_t *locus, const char *val, | |||
217 | 217 | ||
218 | 218 | ||
219 | int | 219 | int |
220 | assert_string_arg (gconf_locus_t *locus, | 220 | assert_string_arg (grecs_locus_t *locus, |
221 | enum gconf_callback_command cmd, | 221 | enum grecs_callback_command cmd, |
222 | const gconf_value_t *value) | 222 | const grecs_value_t *value) |
223 | { | 223 | { |
224 | if (cmd != gconf_callback_set_value) | 224 | if (cmd != grecs_callback_set_value) |
225 | { | 225 | { |
226 | gconf_error (locus, 0, _("Unexpected block statement")); | 226 | grecs_error (locus, 0, _("Unexpected block statement")); |
227 | return 1; | 227 | return 1; |
228 | } | 228 | } |
229 | if (!value || value->type != GCONF_TYPE_STRING) | 229 | if (!value || value->type != GCONF_TYPE_STRING) |
230 | { | 230 | { |
231 | gconf_error (locus, 0, _("expected scalar value as a tag")); | 231 | grecs_error (locus, 0, _("expected scalar value as a tag")); |
232 | return 1; | 232 | return 1; |
233 | } | 233 | } |
234 | return 0; | 234 | return 0; |
235 | } | 235 | } |
236 | 236 | ||
237 | gconf_value_t * | 237 | grecs_value_t * |
238 | get_arg (gconf_locus_t *locus, gconf_value_t *value, unsigned n, int type) | 238 | get_arg (grecs_locus_t *locus, grecs_value_t *value, unsigned n, int type) |
239 | { | 239 | { |
240 | if (n >= value->v.arg.c) | 240 | if (n >= value->v.arg.c) |
241 | { | 241 | { |
242 | gconf_error (locus, 0, _("not enough arguments")); | 242 | grecs_error (locus, 0, _("not enough arguments")); |
243 | return NULL; | 243 | return NULL; |
244 | } | 244 | } |
245 | value = value->v.arg.v + n; | 245 | value = value->v.arg.v + n; |
246 | if (value->type != type) | 246 | if (value->type != type) |
247 | { | 247 | { |
248 | gconf_error (locus, 0, _("argument %d has wrong type"), n); | 248 | grecs_error (locus, 0, _("argument %d has wrong type"), n); |
249 | return NULL; | 249 | return NULL; |
250 | } | 250 | } |
251 | return value; | 251 | return value; |
@@ -253,10 +253,10 @@ get_arg (gconf_locus_t *locus, gconf_value_t *value, unsigned n, int type) | |||
253 | 253 | ||
254 | 254 | ||
255 | static int | 255 | static int |
256 | cb_mailer (enum gconf_callback_command cmd, | 256 | cb_mailer (enum grecs_callback_command cmd, |
257 | gconf_locus_t *locus, | 257 | grecs_locus_t *locus, |
258 | void *varptr, | 258 | void *varptr, |
259 | gconf_value_t *value, | 259 | grecs_value_t *value, |
260 | void *cb_data) | 260 | void *cb_data) |
261 | { | 261 | { |
262 | int rc; | 262 | int rc; |
@@ -265,16 +265,16 @@ cb_mailer (enum gconf_callback_command cmd, | |||
265 | return 1; | 265 | return 1; |
266 | rc = mu_mailer_create (&mailer, value->v.string); | 266 | rc = mu_mailer_create (&mailer, value->v.string); |
267 | if (rc) | 267 | if (rc) |
268 | gconf_error (locus, 0, _("cannot create mailer `%s': %s"), | 268 | grecs_error (locus, 0, _("cannot create mailer `%s': %s"), |
269 | value->v.string, mu_strerror (rc)); | 269 | value->v.string, mu_strerror (rc)); |
270 | return rc; | 270 | return rc; |
271 | } | 271 | } |
272 | 272 | ||
273 | static int | 273 | static int |
274 | cb_email_address (enum gconf_callback_command cmd, | 274 | cb_email_address (enum grecs_callback_command cmd, |
275 | gconf_locus_t *locus, | 275 | grecs_locus_t *locus, |
276 | void *varptr, | 276 | void *varptr, |
277 | gconf_value_t *value, | 277 | grecs_value_t *value, |
278 | void *cb_data) | 278 | void *cb_data) |