diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-21 10:34:43 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-21 10:34:43 +0300 |
commit | 92b663e68d3ded1d4cd6eb8f42a10ced60f85267 (patch) | |
tree | 270fd72bbb6c61081f23dc80565288a8b0b9ff71 /src | |
parent | 9e8cbcb5be43021aed18ffb92bbbb43379bdb6f2 (diff) | |
parent | 3a6373d888021388473bd96c000a8fdab8aedaa5 (diff) | |
download | wydawca-92b663e68d3ded1d4cd6eb8f42a10ced60f85267.tar.gz wydawca-92b663e68d3ded1d4cd6eb8f42a10ced60f85267.tar.bz2 |
Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/wydawca
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/triplet.c | 6 | ||||
-rw-r--r-- | src/wydawca.c | 10 | ||||
-rw-r--r-- | src/wydawca.h | 14 |
8 files changed, 279 insertions, 279 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 993ce0d..c96fbcb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -60,4 +60,4 @@ inc_DATA = $(PP_SETUP_FILE) -LDADD=../gconf/libgconf.a ../gnu/libgnu.a @SQLLIB@ @GPGMELIB@ @MAILUTILS_LIBS@ -INCLUDES = -I$(top_srcdir)/gconf -I$(top_srcdir)/gnu -I../gnu @MAILUTILS_INCLUDES@ +LDADD=../grecs/src/libgrecs.a ../gnu/libgnu.a @SQLLIB@ @GPGMELIB@ @MAILUTILS_LIBS@ +INCLUDES = -I$(top_srcdir)/grecs/src/ -I$(top_srcdir)/gnu -I../gnu @MAILUTILS_INCLUDES@ AM_CPPFLAGS= \ diff --git a/src/cmdline.opt b/src/cmdline.opt index fd87e5e..3515072 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt @@ -135,3 +135,3 @@ OPTION(include-directory,I,DIR, BEGIN - gconf_preproc_add_include_dir (optarg); + grecs_preproc_add_include_dir (optarg); END @@ -161,3 +161,3 @@ OPTION(preprocessor,,COMMAND, BEGIN - gconf_preprocessor = optarg; + grecs_preprocessor = optarg; END @@ -167,3 +167,3 @@ OPTION(no-preprocessor,,, BEGIN - gconf_preprocessor = NULL; + grecs_preprocessor = NULL; END @@ -181,3 +181,3 @@ OPTION(dump-grammar-trace,,, BEGIN - gconf_gram_trace (1); + grecs_gram_trace (1); END @@ -187,3 +187,3 @@ OPTION(dump-lex-trace,,, BEGIN - gconf_lex_trace (1); + grecs_lex_trace (1); END @@ -204,9 +204,9 @@ parse_options(int argc, char *argv[]) GETOPT(argc, argv) - if (pp_cmd_stack_init && gconf_preprocessor) + if (pp_cmd_stack_init && grecs_preprocessor) { char *defs = obstack_finish (&pp_cmd_stack); - char *cmd = xmalloc (strlen (gconf_preprocessor) + strlen (defs) + 1); - strcpy (cmd, gconf_preprocessor); + char *cmd = xmalloc (strlen (grecs_preprocessor) + strlen (defs) + 1); + strcpy (cmd, grecs_preprocessor); strcat (cmd, defs); - gconf_preprocessor = cmd; + grecs_preprocessor = cmd; obstack_free (&pp_cmd_stack, NULL); diff --git a/src/config.c b/src/config.c index 219544b..674e1c3 100644 --- a/src/config.c +++ b/src/config.c @@ -129,3 +129,3 @@ string_to (const char *what, const char *str, int *pret, - gconf_locus_t *locus) + grecs_locus_t *locus) { @@ -135,3 +135,3 @@ string_to (const char *what, const char *str, { - gconf_error (locus, 0, _("unknown %s: %s"), what, str); + grecs_error (locus, 0, _("unknown %s: %s"), what, str); return 1; @@ -140,3 +140,3 @@ string_to (const char *what, const char *str, { - gconf_error (locus, 0, _("ambiguous %s: %s"), what, str); + grecs_error (locus, 0, _("ambiguous %s: %s"), what, str); return 1; @@ -171,3 +171,3 @@ notification_event_str (enum notification_event evt) int -string_to_notification_event (gconf_locus_t *locus, const char *val, +string_to_notification_event (grecs_locus_t *locus, const char *val, enum notification_event *pret) @@ -205,3 +205,3 @@ notification_target_str (enum notification_target tgt) int -string_to_notification_target (gconf_locus_t *locus, const char *val, +string_to_notification_target (grecs_locus_t *locus, const char *val, enum notification_target *pret) @@ -219,9 +219,9 @@ string_to_notification_target (gconf_locus_t *locus, const char *val, int -assert_string_arg (gconf_locus_t *locus, - enum gconf_callback_command cmd, - const gconf_value_t *value) +assert_string_arg (grecs_locus_t *locus, + enum grecs_callback_command cmd, + const grecs_value_t *value) { - if (cmd != gconf_callback_set_value) + if (cmd != grecs_callback_set_value) { - gconf_error (locus, 0, _("Unexpected block statement")); + grecs_error (locus, 0, _("Unexpected block statement")); return 1; @@ -230,3 +230,3 @@ assert_string_arg (gconf_locus_t *locus, { - gconf_error (locus, 0, _("expected scalar value as a tag")); + grecs_error (locus, 0, _("expected scalar value as a tag")); return 1; @@ -236,4 +236,4 @@ assert_string_arg (gconf_locus_t *locus, -gconf_value_t * -get_arg (gconf_locus_t *locus, gconf_value_t *value, unsigned n, int type) +grecs_value_t * +get_arg (grecs_locus_t *locus, grecs_value_t *value, unsigned n, int type) { @@ -241,3 +241,3 @@ get_arg (gconf_locus_t *locus, gconf_value_t *value, unsigned n, int type) { - gconf_error (locus, 0, _("not enough arguments")); + grecs_error (locus, 0, _("not enough arguments")); return NULL; @@ -247,3 +247,3 @@ get_arg (gconf_locus_t *locus, gconf_value_t *value, unsigned n, int type) { - gconf_error (locus, 0, _("argument %d has wrong type"), n); + grecs_error (locus, 0, _("argument %d has wrong type"), n); return NULL; @@ -255,6 +255,6 @@ get_arg (gconf_locus_t *locus, gconf_value_t *value, unsigned n, int type) static int -cb_mailer (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_mailer (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -267,3 +267,3 @@ cb_mailer (enum gconf_callback_command cmd, if (rc) - gconf_error (locus, 0, _("cannot create mailer `%s': %s"), + grecs_error (locus, 0, _("cannot create mailer `%s': %s"), value->v.string, mu_strerror (rc)); @@ -273,6 +273,6 @@ cb_mailer (enum gconf_callback_command cmd, static int -cb_email_address (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_email_address (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -288,3 +288,3 @@ cb_email_address (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("%s: invalid email address: %s"), + grecs_error (locus, 0, _("%s: invalid email address: %s"), value->v.string, mu_strerror (rc)); @@ -301,3 +301,3 @@ cb_email_address (enum gconf_callback_command cmd, { - const gconf_value_t *vp = p; + const grecs_value_t *vp = p; mu_address_t a; @@ -311,3 +311,3 @@ cb_email_address (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("%s: invalid email address: %s"), + grecs_error (locus, 0, _("%s: invalid email address: %s"), vp->v.string, mu_strerror (rc)); @@ -322,3 +322,3 @@ cb_email_address (enum gconf_callback_command cmd, case GCONF_TYPE_ARRAY: - gconf_error (locus, 0, _("too many arguments")); + grecs_error (locus, 0, _("too many arguments")); return 1; @@ -331,6 +331,6 @@ cb_email_address (enum gconf_callback_command cmd, static int -cb_interval (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_interval (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -348,3 +348,3 @@ cb_interval (enum gconf_callback_command cmd, if (rc) - gconf_error (locus, 0, _("unrecognized interval format (near `%s')"), + grecs_error (locus, 0, _("unrecognized interval format (near `%s')"), endp); @@ -356,6 +356,6 @@ cb_interval (enum gconf_callback_command cmd, static int -cb_absolute_name (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_absolute_name (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -370,3 +370,3 @@ cb_absolute_name (enum gconf_callback_command cmd, if (!word || word[0] != '/') - gconf_error (locus, 0, _("must be an absolute file name")); + grecs_error (locus, 0, _("must be an absolute file name")); else @@ -377,6 +377,6 @@ cb_absolute_name (enum gconf_callback_command cmd, static int -cb_set_umask (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_set_umask (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -390,3 +390,3 @@ cb_set_umask (enum gconf_callback_command cmd, if (*p) - gconf_error (locus, 0, _("invalid umask (near %s)"), p); + grecs_error (locus, 0, _("invalid umask (near %s)"), p); else @@ -433,3 +433,3 @@ ARGMATCH_VERIFY (stat_args, stat_types); static int -parse_single_statmask (gconf_locus_t *locus, const gconf_value_t *val, +parse_single_statmask (grecs_locus_t *locus, const grecs_value_t *val, unsigned long *pmask, int *invert) @@ -441,3 +441,3 @@ parse_single_statmask (gconf_locus_t *locus, const gconf_value_t *val, { - gconf_error (locus, 0, _("expected scalar value but found list")); + grecs_error (locus, 0, _("expected scalar value but found list")); return 1; @@ -464,3 +464,3 @@ parse_single_statmask (gconf_locus_t *locus, const gconf_value_t *val, { - gconf_error (locus, 0, _("unknown statistics type: %s"), arg); + grecs_error (locus, 0, _("unknown statistics type: %s"), arg); return 1; @@ -469,3 +469,3 @@ parse_single_statmask (gconf_locus_t *locus, const gconf_value_t *val, { - gconf_error (locus, 0, _("ambiguous statistics type: %s"), arg); + grecs_error (locus, 0, _("ambiguous statistics type: %s"), arg); return 1; @@ -477,3 +477,3 @@ parse_single_statmask (gconf_locus_t *locus, const gconf_value_t *val, static int -parse_statmask (gconf_locus_t *loc, gconf_value_t *val, unsigned long *pmask) +parse_statmask (grecs_locus_t *loc, grecs_value_t *val, unsigned long *pmask) { @@ -513,3 +513,3 @@ parse_statmask (gconf_locus_t *loc, gconf_value_t *val, unsigned long *pmask) { - const gconf_value_t *vp = p; + const grecs_value_t *vp = p; unsigned long x; @@ -532,6 +532,6 @@ parse_statmask (gconf_locus_t *loc, gconf_value_t *val, unsigned long *pmask) static int -cb_statistics (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_statistics (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -543,6 +543,6 @@ cb_statistics (enum gconf_callback_command cmd, static int -cb_sql_host (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_sql_host (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -571,3 +571,3 @@ cb_sql_host (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("invalid port number (near %s)"), end); + grecs_error (locus, 0, _("invalid port number (near %s)"), end); return 0; @@ -576,3 +576,3 @@ cb_sql_host (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("port number out of range 1..%d"), + grecs_error (locus, 0, _("port number out of range 1..%d"), USHRT_MAX); @@ -591,6 +591,6 @@ cb_sql_host (enum gconf_callback_command cmd, static int -cb_sql (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_sql (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -601,6 +601,6 @@ cb_sql (enum gconf_callback_command cmd, switch (cmd) { - case gconf_callback_section_begin: + case grecs_callback_section_begin: if (!value || value->type != GCONF_TYPE_STRING) { - gconf_error(locus, 0, _("tag must be a string")); + grecs_error(locus, 0, _("tag must be a string")); return 0; @@ -612,3 +612,3 @@ cb_sql (enum gconf_callback_command cmd, - case gconf_callback_section_end: + case grecs_callback_section_end: pconn = *pdata; @@ -619,4 +619,4 @@ cb_sql (enum gconf_callback_command cmd, - case gconf_callback_set_value: - gconf_error (locus, 0, _("invalid use of block statement")); + case grecs_callback_set_value: + grecs_error (locus, 0, _("invalid use of block statement")); } @@ -625,11 +625,11 @@ cb_sql (enum gconf_callback_command cmd, -static struct gconf_keyword sql_kw[] = { +static struct grecs_keyword sql_kw[] = { { "host", N_("host"), N_("Set SQL server hostname or IP address"), - gconf_type_string, NULL, 0, cb_sql_host }, + grecs_type_string, NULL, 0, cb_sql_host }, { "database", N_("dbname"), N_("Set database name"), - gconf_type_string, NULL, offsetof(struct sqlconn, database), }, + grecs_type_string, NULL, offsetof(struct sqlconn, database), }, { "user", N_("name"), N_("Set SQL user name"), - gconf_type_string, NULL, offsetof(struct sqlconn, user) }, + grecs_type_string, NULL, offsetof(struct sqlconn, user) }, { "password", N_("arg"), N_("Set SQL user password"), - gconf_type_string, NULL, offsetof(struct sqlconn, password) }, + grecs_type_string, NULL, offsetof(struct sqlconn, password) }, { NULL } @@ -639,6 +639,6 @@ static struct gconf_keyword sql_kw[] = { static int -cb_syslog_facility (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_syslog_facility (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -649,3 +649,3 @@ cb_syslog_facility (enum gconf_callback_command cmd, if (mu_string_to_syslog_facility (value->v.string, varptr)) - gconf_error (locus, 0, _("Unknown syslog facility `%s'"), + grecs_error (locus, 0, _("Unknown syslog facility `%s'"), value->v.string); @@ -656,6 +656,6 @@ cb_syslog_facility (enum gconf_callback_command cmd, static int -cb_define_message (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_define_message (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -664,5 +664,5 @@ cb_define_message (enum gconf_callback_command cmd, - if (cmd != gconf_callback_set_value) + if (cmd != grecs_callback_set_value) { - gconf_error (locus, 0, _("Unexpected block statement")); + grecs_error (locus, 0, _("Unexpected block statement")); return 1; @@ -671,3 +671,3 @@ cb_define_message (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("expected two arguments")); + grecs_error (locus, 0, _("expected two arguments")); return 1; @@ -677,3 +677,3 @@ cb_define_message (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("first argument not a string")); + grecs_error (locus, 0, _("first argument not a string")); return 1; @@ -684,3 +684,3 @@ cb_define_message (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("second argument not a string")); + grecs_error (locus, 0, _("second argument not a string")); return 1; @@ -694,3 +694,3 @@ cb_define_message (enum gconf_callback_command cmd, -static struct gconf_keyword syslog_kw[] = { +static struct grecs_keyword syslog_kw[] = { { "facility", @@ -700,7 +700,7 @@ static struct gconf_keyword syslog_kw[] = { "or a facility number."), - gconf_type_string, &log_facility, 0, cb_syslog_facility }, + grecs_type_string, &log_facility, 0, cb_syslog_facility }, { "tag", N_("string"), N_("Tag syslog messages with this string"), - gconf_type_string, &syslog_tag }, + grecs_type_string, &syslog_tag }, { "print-priority", N_("arg"), N_("Prefix each message with its priority"), - gconf_type_bool, &syslog_include_prio }, + grecs_type_bool, &syslog_include_prio }, { NULL }, @@ -733,3 +733,3 @@ ARGMATCH_VERIFY (backup_args, backup_types); static enum backup_type -get_backup_version (gconf_locus_t *locus, const char *ctx, +get_backup_version (grecs_locus_t *locus, const char *ctx, const char *version) @@ -744,6 +744,6 @@ get_backup_version (gconf_locus_t *locus, const char *ctx, if (ctx) - gconf_error (locus, 0, _("%s: ambiguous backup type `%s'"), + grecs_error (locus, 0, _("%s: ambiguous backup type `%s'"), ctx, version); else - gconf_error (locus, 0, _("ambiguous backup type `%s'"), version); + grecs_error (locus, 0, _("ambiguous backup type `%s'"), version); return no_backups; @@ -753,6 +753,6 @@ get_backup_version (gconf_locus_t *locus, const char *ctx, if (ctx) - gconf_error (locus, 0, _("%s: invalid backup type `%s'"), + grecs_error (locus, 0, _("%s: invalid backup type `%s'"), ctx, version); else - gconf_error (locus, 0, _("invalid backup type `%s'"), version); + grecs_error (locus, 0, _("invalid backup type `%s'"), version); return no_backups; @@ -764,6 +764,6 @@ get_backup_version (gconf_locus_t *locus, const char *ctx, static int -cb_backup (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_backup (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -778,7 +778,7 @@ cb_backup (enum gconf_callback_command cmd, -static struct gconf_keyword archive_kw[] = { +static struct grecs_keyword archive_kw[] = { { "name", N_("file-or-dir"), N_("Name of archive file or directory"), - gconf_type_string, NULL, offsetof(struct archive_descr, name) }, + grecs_type_string, NULL, offsetof(struct archive_descr, name) }, { "backup", N_("type"), N_("Define backup type"), - gconf_type_string, NULL, offsetof(struct archive_descr, backup_type), + grecs_type_string, NULL, offsetof(struct archive_descr, backup_type), cb_backup }, @@ -788,6 +788,6 @@ static struct gconf_keyword archive_kw[] = { static int -cb_archive (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_archive (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -799,9 +799,9 @@ cb_archive (enum gconf_callback_command cmd, { - case gconf_callback_section_begin: + case grecs_callback_section_begin: *pdata = arch; /* fallthrough */ - case gconf_callback_set_value: + case grecs_callback_set_value: if (!value) { - gconf_error (locus, 0, _("expected tag")); + grecs_error (locus, 0, _("expected tag")); return 1; @@ -811,3 +811,3 @@ cb_archive (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("expected scalar value but found list")); + grecs_error (locus, 0, _("expected scalar value but found list")); return 1; @@ -823,6 +823,6 @@ cb_archive (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("unknown archive type")); + grecs_error (locus, 0, _("unknown archive type")); return 1; } - if (cmd == gconf_callback_section_begin) + if (cmd == grecs_callback_section_begin) return 0; @@ -830,3 +830,3 @@ cb_archive (enum gconf_callback_command cmd, - case gconf_callback_section_end: + case grecs_callback_section_end: break; @@ -839,3 +839,3 @@ cb_archive (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("at least archive name must be set")); + grecs_error (locus, 0, _("at least archive name must be set")); return 1; @@ -845,3 +845,3 @@ cb_archive (enum gconf_callback_command cmd, { - gconf_warning (locus, 0, _("backup type ignored for this archive type")); + grecs_warning (locus, 0, _("backup type ignored for this archive type")); return 1; @@ -853,8 +853,8 @@ cb_archive (enum gconf_callback_command cmd, -static struct gconf_keyword mail_statistics_kw[] = { +static struct grecs_keyword mail_statistics_kw[] = { { "message", N_("text"), N_("Message text"), - gconf_type_string, &admin_stat_message }, + grecs_type_string, &admin_stat_message }, { "statistics", N_("items"), N_("Send mail if one or more of these items are set"), - gconf_type_string, &mail_admin_mask, 0, cb_statistics }, + grecs_type_string, &mail_admin_mask, 0, cb_statistics }, { NULL } @@ -865,6 +865,6 @@ static struct gconf_keyword mail_statistics_kw[] = { static int -cb_event (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_event (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -880,6 +880,6 @@ cb_event (enum gconf_callback_command cmd, static int -cb_recipient (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_recipient (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -894,7 +894,7 @@ cb_recipient (enum gconf_callback_command cmd, -static struct gconf_keyword notify_event_kw[] = { +static struct grecs_keyword notify_event_kw[] = { { "event", N_("ev-id"), N_("Event on which to notify"), - gconf_type_string, NULL, offsetof(struct notification, ev), cb_event }, + grecs_type_string, NULL, offsetof(struct notification, ev), cb_event }, { "recipient", N_("who"), N_("Notify this recipient"), - gconf_type_string, NULL, offsetof(struct notification, tgt), + grecs_type_string, NULL, offsetof(struct notification, tgt), cb_recipient }, @@ -902,3 +902,3 @@ static struct gconf_keyword notify_event_kw[] = { N_("Text of the notification or identifier of a defined message template"), - gconf_type_string, NULL, offsetof(struct notification, msg) }, + grecs_type_string, NULL, offsetof(struct notification, msg) }, { NULL } @@ -907,6 +907,6 @@ static struct gconf_keyword notify_event_kw[] = { static int -cb_notify_event (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_notify_event (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -917,3 +917,3 @@ cb_notify_event (enum gconf_callback_command cmd, switch (cmd) { - case gconf_callback_section_begin: + case grecs_callback_section_begin: ntf = xzalloc (sizeof (*ntf)); @@ -922,6 +922,6 @@ cb_notify_event (enum gconf_callback_command cmd, - case gconf_callback_section_end: + case grecs_callback_section_end: ntf = *pdata; if (!ntf->msg) - gconf_error (locus, 0, _("missing message definition")); + grecs_error (locus, 0, _("missing message definition")); else @@ -935,4 +935,4 @@ cb_notify_event (enum gconf_callback_command cmd, - case gconf_callback_set_value: - gconf_error (locus, 0, _("invalid use of block statement")); + case grecs_callback_set_value: + grecs_error (locus, 0, _("invalid use of block statement")); } @@ -957,6 +957,6 @@ string_to_access_method_type (const char *str) static int -cb_access_method_type (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_access_method_type (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -969,3 +969,3 @@ cb_access_method_type (enum gconf_callback_command cmd, if (*ptype == method_none) - gconf_error (locus, 0, _("unknown access method: %s"), value->v.string); + grecs_error (locus, 0, _("unknown access method: %s"), value->v.string); return 0; @@ -974,6 +974,6 @@ cb_access_method_type (enum gconf_callback_command cmd, static int -cb_access_method_params (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_access_method_params (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -983,5 +983,5 @@ cb_access_method_params (enum gconf_callback_command cmd, - if (cmd != gconf_callback_set_value) + if (cmd != grecs_callback_set_value) { - gconf_error (locus, 0, _("Unexpected block statement")); + grecs_error (locus, 0, _("Unexpected block statement")); return 1; @@ -990,3 +990,3 @@ cb_access_method_params (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("expected list value")); + grecs_error (locus, 0, _("expected list value")); return 1; @@ -1011,3 +1011,3 @@ cb_access_method_params (enum gconf_callback_command cmd, { - const gconf_value_t *vp = p; + const grecs_value_t *vp = p; @@ -1024,10 +1024,10 @@ cb_access_method_params (enum gconf_callback_command cmd, -static struct gconf_keyword access_method_kw[] = { +static struct grecs_keyword access_method_kw[] = { { "type", N_("type"), N_("Method type"), - gconf_type_string, NULL, offsetof(struct access_method, type), + grecs_type_string, NULL, offsetof(struct access_method, type), cb_access_method_type }, { "query", N_("string"), N_("Query template"), - gconf_type_string, NULL, offsetof(struct access_method, query) }, + grecs_type_string, NULL, offsetof(struct access_method, query) }, { "params", N_("arg"), N_("Set method parameters"), - gconf_type_string|GCONF_LIST, NULL, 0, + grecs_type_string|GCONF_LIST, NULL, 0, cb_access_method_params }, @@ -1037,3 +1037,3 @@ static struct gconf_keyword access_method_kw[] = { int -string_to_access_method_id (gconf_locus_t *locus, +string_to_access_method_id (grecs_locus_t *locus, const char *str, enum access_method_id *idp) @@ -1065,6 +1065,6 @@ string_to_access_method_id (gconf_locus_t *locus, static int -cb_access_method (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_access_method (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -1076,6 +1076,6 @@ cb_access_method (enum gconf_callback_command cmd, switch (cmd) { - case gconf_callback_section_begin: + case grecs_callback_section_begin: if (!value || value->type != GCONF_TYPE_STRING) { - gconf_error(locus, 0, _("tag must be a string")); + grecs_error(locus, 0, _("tag must be a string")); return 0; @@ -1089,3 +1089,3 @@ cb_access_method (enum gconf_callback_command cmd, - case gconf_callback_section_end: + case grecs_callback_section_end: meth = *pdata; @@ -1096,3 +1096,3 @@ cb_access_method (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("SQL connection is not declared")); + grecs_error (locus, 0, _("SQL connection is not declared")); meth->type = method_none; @@ -1101,3 +1101,3 @@ cb_access_method (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("SQL connection `%s' not declared"), + grecs_error (locus, 0, _("SQL connection `%s' not declared"), meth->parmv[0]); @@ -1114,4 +1114,4 @@ cb_access_method (enum gconf_callback_command cmd, - case gconf_callback_set_value: - gconf_error (locus, 0, _("invalid use of block statement")); + case grecs_callback_set_value: + grecs_error (locus, 0, _("invalid use of block statement")); } @@ -1121,6 +1121,6 @@ cb_access_method (enum gconf_callback_command cmd, static int -cb_url (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_url (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -1135,3 +1135,3 @@ cb_url (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("cannot create URL `%s': %s"), + grecs_error (locus, 0, _("cannot create URL `%s': %s"), value->v.string, mu_strerror (rc)); @@ -1142,3 +1142,3 @@ cb_url (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("cannot parse URL `%s': %s"), + grecs_error (locus, 0, _("cannot parse URL `%s': %s"), value->v.string, mu_strerror (rc)); @@ -1152,25 +1152,25 @@ cb_url (enum gconf_callback_command cmd, -static struct gconf_keyword spool_kw[] = { +static struct grecs_keyword spool_kw[] = { { "url", N_("arg"), N_("URL corresponding to this spool"), - gconf_type_string, NULL, offsetof(struct spool, url) }, + grecs_type_string, NULL, offsetof(struct spool, url) }, { "alias", N_("arg"), N_("Aliases"), - gconf_type_string|GCONF_LIST, NULL, offsetof(struct spool, aliases) }, + grecs_type_string|GCONF_LIST, NULL, offsetof(struct spool, aliases) }, { "source", N_("dir"), N_("Source directory"), - gconf_type_string, NULL, offsetof(struct spool, source_dir) }, + grecs_type_string, NULL, offsetof(struct spool, source_dir) }, { "destination", N_("dir"), N_("Destination directory"), - gconf_type_string, NULL, offsetof(struct spool, dest_url), + grecs_type_string, NULL, offsetof(struct spool, dest_url), cb_url }, { "file-sweep-time", N_("interval"), N_("Define file sweep time"), - gconf_type_string, NULL, offsetof(struct spool, file_sweep_time), + grecs_type_string, NULL, offsetof(struct spool, file_sweep_time), cb_interval }, { "access-method", N_("ident"), N_("Define access method"), - gconf_type_section, NULL, offsetof(struct spool, access_method), + grecs_type_section, NULL, offsetof(struct spool, access_method), cb_access_method, NULL, access_method_kw }, { "archive", N_("type: string"), N_("Set up archivation"), - gconf_type_section, NULL, offsetof(struct spool, archive), + grecs_type_section, NULL, offsetof(struct spool, archive), cb_archive, NULL, archive_kw }, { "archive-signatures", NULL, N_("Control implicit signature archivation"), - gconf_type_bool, &archive_signatures }, + grecs_type_bool, &archive_signatures }, { "notify-event", NULL, N_("Configure notification"), - gconf_type_section, NULL, offsetof(struct spool, notification), + grecs_type_section, NULL, offsetof(struct spool, notification), cb_notify_event, NULL, notify_event_kw }, @@ -1181,6 +1181,6 @@ static struct gconf_keyword spool_kw[] = { static int -cb_spool (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_spool (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -1193,6 +1193,6 @@ cb_spool (enum gconf_callback_command cmd, { - case gconf_callback_section_begin: + case grecs_callback_section_begin: if (!value || value->type != GCONF_TYPE_STRING) { - gconf_error (locus, 0, _("tag must be a string")); + grecs_error (locus, 0, _("tag must be a string")); return 1; @@ -1208,3 +1208,3 @@ cb_spool (enum gconf_callback_command cmd, - case gconf_callback_section_end: + case grecs_callback_section_end: rc = 0; @@ -1213,3 +1213,3 @@ cb_spool (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("source is not given")); + grecs_error (locus, 0, _("source is not given")); rc = 1; @@ -1219,5 +1219,5 @@ cb_spool (enum gconf_callback_command cmd, if (ec) - gconf_error (locus, ec, _("cannot access %s"), spool->source_dir); + grecs_error (locus, ec, _("cannot access %s"), spool->source_dir); else - gconf_error (locus, 0, _("%s is not a directory"), + grecs_error (locus, 0, _("%s is not a directory"), spool->source_dir); @@ -1228,3 +1228,3 @@ cb_spool (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("destination is not given")); + grecs_error (locus, 0, _("destination is not given")); rc = 1; @@ -1233,3 +1233,3 @@ cb_spool (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("unsupported url: %s"), + grecs_error (locus, 0, _("unsupported url: %s"), mu_url_to_string (spool->dest_url)); @@ -1244,3 +1244,3 @@ cb_spool (enum gconf_callback_command cmd, { - gconf_error (locus, 0, + grecs_error (locus, 0, _("Sorry, method type `external' is not yet supported")); @@ -1260,4 +1260,4 @@ cb_spool (enum gconf_callback_command cmd, - case gconf_callback_set_value: - gconf_error (locus, 0, _("invalid use of block statement")); + case grecs_callback_set_value: + grecs_error (locus, 0, _("invalid use of block statement")); } @@ -1268,6 +1268,6 @@ cb_spool (enum gconf_callback_command cmd, static int -cb_user (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_user (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) @@ -1282,3 +1282,3 @@ cb_user (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("no such user: %s"), value->v.string); + grecs_error (locus, 0, _("no such user: %s"), value->v.string); return 1; @@ -1292,11 +1292,11 @@ cb_user (enum gconf_callback_command cmd, static int -cb_supp_groups (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_supp_groups (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) { - if (cmd != gconf_callback_set_value) + if (cmd != grecs_callback_set_value) { - gconf_error (locus, 0, _("Unexpected block statement")); + grecs_error (locus, 0, _("Unexpected block statement")); return 1; @@ -1305,3 +1305,3 @@ cb_supp_groups (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("expected list value")); + grecs_error (locus, 0, _("expected list value")); return 1; @@ -1323,3 +1323,3 @@ cb_supp_groups (enum gconf_callback_command cmd, { - const gconf_value_t *vp = p; + const grecs_value_t *vp = p; struct group *grp; @@ -1331,3 +1331,3 @@ cb_supp_groups (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("no such group: %s"), value->v.string); + grecs_error (locus, 0, _("no such group: %s"), value->v.string); break; @@ -1342,13 +1342,13 @@ cb_supp_groups (enum gconf_callback_command cmd, -static struct gconf_keyword locking_kw[] = { +static struct grecs_keyword locking_kw[] = { { "enable", NULL, N_("Enable or disable locking"), - gconf_type_bool, &enable_locking }, + grecs_type_bool, &enable_locking }, { "directory", N_("dir"), N_("Set directory for lock files"), - gconf_type_string, &lockdir }, + grecs_type_string, &lockdir }, { "expire-time", N_("interval"), N_("Define lock expiration interval"), - gconf_type_string, &lock_expire_time, 0, cb_interval }, + grecs_type_string, &lock_expire_time, 0, cb_interval }, { "retry-attempts", N_("n"), N_("Number of times to retry locking"), - gconf_type_uint, &lock_retry_attempts }, + grecs_type_uint, &lock_retry_attempts }, { "retry-interval", N_("interval"), N_("Delay between locking attempts"), - gconf_type_string, &lock_retry_interval, 0, cb_interval }, + grecs_type_string, &lock_retry_interval, 0, cb_interval }, { NULL } @@ -1357,9 +1357,9 @@ static struct gconf_keyword locking_kw[] = { static int -cb_locking (enum gconf_callback_command cmd, - gconf_locus_t *locus, +cb_locking (enum grecs_callback_command cmd, + grecs_locus_t *locus, void *varptr, - gconf_value_t *value, + grecs_value_t *value, void *cb_data) { - if (cmd == gconf_callback_set_value) + if (cmd == grecs_callback_set_value) { @@ -1367,6 +1367,6 @@ cb_locking (enum gconf_callback_command cmd, { - gconf_error (locus, 0, _("expected scalar value as a tag")); + grecs_error (locus, 0, _("expected scalar value as a tag")); return 1; } - gconf_string_convert (&enable_locking, gconf_type_bool, value->v.string); + grecs_string_convert (&enable_locking, grecs_type_bool, value->v.string); } @@ -1377,21 +1377,21 @@ cb_locking (enum gconf_callback_command cmd, -static struct gconf_keyword wydawca_kw[] = { +static struct grecs_keyword wydawca_kw[] = { { "daemon", NULL, N_("Enable daemon mode"), - gconf_type_bool, &daemon_mode }, + grecs_type_bool, &daemon_mode }, { "foreground", NULL, N_("Start in foreground even in daemon mode"), - gconf_type_bool, &foreground }, + grecs_type_bool, &foreground }, { "single-process", NULL, N_("Do not spawn subpr |