diff options
-rw-r--r-- | doc/Makefile.am | 4 | ||||
-rwxr-xr-x | doc/check-docs.sh | 6 | ||||
-rw-r--r-- | doc/mastermenu.el | 4 | ||||
-rw-r--r-- | doc/rendition.texi | 2 | ||||
-rw-r--r-- | doc/wydawca.texi | 144 | ||||
-rw-r--r-- | src/builtin.c | 22 | ||||
-rw-r--r-- | src/cmdline.opt | 2 | ||||
-rw-r--r-- | src/config.c | 94 | ||||
-rw-r--r-- | src/directive.c | 36 | ||||
-rw-r--r-- | src/diskio.c | 76 | ||||
-rw-r--r-- | src/exec.c | 12 | ||||
-rw-r--r-- | src/getopt.m4 | 60 | ||||
-rw-r--r-- | src/gpg.c | 34 | ||||
-rw-r--r-- | src/interval.c | 8 | ||||
-rw-r--r-- | src/mail.c | 30 | ||||
-rw-r--r-- | src/method.c | 22 | ||||
-rw-r--r-- | src/process.c | 18 | ||||
-rw-r--r-- | src/sql.c | 14 | ||||
-rw-r--r-- | src/triplet.c | 48 | ||||
-rw-r--r-- | src/verify.c | 22 | ||||
-rw-r--r-- | src/wydawca.c | 46 | ||||
-rw-r--r-- | src/wydawca.h | 18 | ||||
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/atlocal.in | 2 | ||||
-rw-r--r-- | tests/mailstats.at | 26 |
25 files changed, 377 insertions, 377 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 7afd676..0ef1e64 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -53,7 +53,7 @@ check-options: '/@c option --/{s///;s/^\(help\|version\|usage\)//;p}' \ $(top_srcdir)/src/cmdline.opt -- \ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ - $(info_TEXINFOS) + $(info_TEXINFOS) check-refs: @sed -e = $(info_TEXINFOS) $(wydawca_TEXINFOS) | \ @@ -93,7 +93,7 @@ check-unrevised: all-check-docs: check-format check-options check-refs check-fixmes check-unrevised check-writeme -check-docs: +check-docs: $(MAKE) -k all-check-docs master-menu: diff --git a/doc/check-docs.sh b/doc/check-docs.sh index c0b0487..16b6b0e 100755 --- a/doc/check-docs.sh +++ b/doc/check-docs.sh @@ -42,7 +42,7 @@ do fi source="$source $1" shift -done +done TEMPDIR=/tmp/mfck.$$ mkdir $TEMPDIR || exit 1 @@ -57,14 +57,14 @@ join -v1 $TEMPDIR/src $TEMPDIR/doc > $TEMPDIR/src-doc join -v2 $TEMPDIR/src $TEMPDIR/doc > $TEMPDIR/doc-src (if [ -s $TEMPDIR/src-doc ]; then echo "Not documented $item:" - cat $TEMPDIR/src-doc + cat $TEMPDIR/src-doc fi if [ -s $TEMPDIR/doc-src ]; then echo "Non-existing $item:" cat $TEMPDIR/doc-src fi) > $TEMPDIR/report -if [ -s $TEMPDIR/report ]; then +if [ -s $TEMPDIR/report ]; then cat $TEMPDIR/report rm -rf $TEMPDIR exit 1 diff --git a/doc/mastermenu.el b/doc/mastermenu.el index 3ab3341..a38e824 100644 --- a/doc/mastermenu.el +++ b/doc/mastermenu.el @@ -26,11 +26,11 @@ ;; This file redefines texinfo-master-menu-list so that it takes into ;; account included files. -;; Known bugs: @menu without previous sectioning command will inherit +;; Known bugs: @menu without previous sectioning command will inherit ;; documentation string from the previous menu. However, since such a ;; menu is illegal in a texinfo file, we can live with it. -(require 'texinfo) +(require 'texinfo) (require 'texnfo-upd) (defun texinfo-master-menu-list-recursive (title) diff --git a/doc/rendition.texi b/doc/rendition.texi index 016583d..c4092ea 100644 --- a/doc/rendition.texi +++ b/doc/rendition.texi @@ -1,7 +1,7 @@ @c Let's use the concept of 'renditions' by Fra@,{c}ois Pinard @c I extended it by adding a FIXME_FOOTNOTE variable, which controls @c whether FIXME information should be placed in footnotes or -@c inlined. +@c inlined. @c ====================================================================== @c This document has three levels of rendition: PUBLISH, DISTRIB or PROOF, diff --git a/doc/wydawca.texi b/doc/wydawca.texi index 3f5a682..876a8fa 100644 --- a/doc/wydawca.texi +++ b/doc/wydawca.texi @@ -159,7 +159,7 @@ distributed tarball must be placed, and clear-signs it using his From now on, it is the responsibility of a @dfn{release submission daemon} to scan the source directories, gather the triplets, verify them, and to move any files that had passed the verification successfully to -their distribution sites. +their distribution sites. @command{Wydawca} is such a release submission daemon. It is able to handle any number of @samp{source/destination} pairs, offers an @@ -265,7 +265,7 @@ etc. @dfn{configuration file} (@pxref{wydawca.rc}). The default configuration file is @file{@var{sysconfdir}/wydawca.rc}, but if it is located elsewhere, you can specify its new location with the -@option{--config-file} (@option{-c}) command line option. +@option{--config-file} (@option{-c}) command line option. @anchor{lint} @xopindex{lint, described} @@ -308,7 +308,7 @@ it may be necessary when debugging new configurations. Each @command{wydawca -dd} to obtain level 2, for example. The maximum debugging level currently is 4, which prints an impractically big amount of information, which is useful mainly for @command{wydawca} -developers. +developers. @anchor{dry-run} @xopindex{dry-run, described} @@ -321,7 +321,7 @@ diagnostics output to the standard error, as if @option{--debug --stderr} options have been given. You can raise debugging level further by supplying additional @option{--debug} options. The @option{--dry-run} option is useful when testing new configurations, -for example: +for example: @smallexample $ wydawca -c new.cfg --dry-run @@ -333,7 +333,7 @@ $ wydawca -c new.cfg --dry-run @sopindex{v, described} In addition, the two usual informational options are available as well: @option{--help} (@option{-h}) prints a short usage summary, and -@option{--version} (@option{-v}) prints program version number. +@option{--version} (@option{-v}) prints program version number. @node configuring, wydawca.rc, starting, Top @chapter How to Configure @command{wydawca}. @@ -378,7 +378,7 @@ statements (both simple and compound) may appear. When a statement appears outside of any block statement, we say that it appears at @dfn{the top level} or @dfn{its scope is global}. When it appears within a block statement, we say that @dfn{it has block -scope}. +scope}. This subsection will guide you through the @command{wydawca} configuration on a step-by-step basis. @@ -402,7 +402,7 @@ configuration on a step-by-step basis. @UNREVISED You can request inclusion of any file into your configuration file using @code{include} statement. Its only argument supplies the name of -file to be included. For example: +file to be included. For example: @smallexample include /etc/wydawca/msg @@ -452,7 +452,7 @@ file name of the configuration file. This form might be useful when debugging new configurations. For example, the following command runs @command{wydawca} in dry run mode, using configuration file @file{./test.rc}, and looking for include files in the current working -directory: +directory: @smallexample $ wydawca --config ./test.rc -I --dry-run @@ -472,7 +472,7 @@ effect. Unless told otherwise, @command{wydawca} uses @code{syslog} to print its diagnostic messages. By default, the program uses the @samp{local1} facility. To change this, use @code{syslog-facility} -statement: +statement: @smallexample syslog-facility local2 @@ -488,7 +488,7 @@ syslog-facility local2 values are: @samp{auth}, @samp{authpriv}, @samp{cron}, @samp{daemon}, @samp{ftp}, @samp{local0} through @samp{local7}, and @samp{mail}. These names are case-insensitive and may be optionally -prefixed with @samp{log_} (case-insensitive as well). +prefixed with @samp{log_} (case-insensitive as well). @kwindex syslog-tag @cindex syslog tag, configuring @@ -525,7 +525,7 @@ releases). @kwindex sql A database is defined using @code{sql} block statement. It has the -following syntax: +following syntax: @smallexample @group @@ -597,7 +597,7 @@ in the table below: @item builtin This method is reserved for future use. -@kwindex sql@r{, access method type} +@kwindex sql@r{, access method type} @item sql Retrieve data from an @acronym{SQL} database. Currently only @command{MySQL} is supported. @@ -605,7 +605,7 @@ in the table below: @kwindex external@r{, access method type} @item external Retrieve data using an external program. This method is reserved for -future use. +future use. @end table Access methods are defined in configuration file using the @@ -624,7 +624,7 @@ where @var{method-name} is the predefined name of the access method, the configuration file, or inside a @code{directory} statement (@pxref{directory pairs}). Global definitions affect all directory pairs in the configuration file, and ones inside a @code{directory} -statement override them for that particular directory pair. +statement override them for that particular directory pair. There are four predefined methods, which are described later in this section. The @var{type} must currently always be @samp{sql}. The @@ -667,8 +667,8 @@ shortest initial prefix of that value, not containing slashes. by @var{method-name} in the syntax above) used by @command{wydawca}. They are illustrated by example definitions, based on the database structure used in -@uref{http://gna.org/projects/savane, @command{Savane} system}. - +@uref{http://gna.org/projects/savane, @command{Savane} system}. + @deffn {Access Method} gpg-key @cindex @acronym{PGP} public key, retrieving @cindex public @acronym{PGP} key, retrieving @@ -676,18 +676,18 @@ on the database structure used in return exactly one string. The sample definition is: - + @smallexample gpg-key sql default SELECT gpg_key \ FROM user \ WHERE user_name='%@{user@}' @end smallexample @end deffn - + @deffn {Access Method} project-owner Retrieve email addresses and real names of administrators (or @dfn{owners}) of a project. It may return any number of rows, each one -consisting of two columns: an email address and a user name, in this order. +consisting of two columns: an email address and a user name, in this order. @smallexample @group @@ -704,7 +704,7 @@ project-owner sql default SELECT user.email, user.realname \ @deffn {Access Method} user-data Return email address and real name of a user. This method must return one tuple, consisting of two columns: an email address and a user -name, in this order. +name, in this order. @smallexample @group @@ -714,7 +714,7 @@ user-data sql default SELECT email, realname \ @end group @end smallexample @end deffn - + @deffn {Access Method} verify-user Verify if a user is allowed to make uploads for a certain project. This method must return the system name of the user if he is allowed to @@ -722,9 +722,9 @@ make uploads. The following definition allows uploads only for project administrators: - + @smallexample -@group +@group verify-user sql default SELECT user.user_name \ FROM user,user_group,groups \ WHERE user_group.user_id=user.user_id \ @@ -750,7 +750,7 @@ warning messages: @smallexample sendfile: copying @var{source} to @var{dest} failed: Invalid value - + sendfile: copying @var{source} to @var{dest} failed: Function not implemented @end smallexample @@ -765,7 +765,7 @@ enable-sendfile no In particular, you need to disable sendfile when compiling @command{wydawca} for Linux kernels starting from version 2.6.9 and -higher. +higher. @node archivation @section Archivation @@ -777,7 +777,7 @@ existing distributed files with another ones, having the same names. @command{wydawca} needs to first @dfn{archive} the already existing file, and then put the new one in its place. Moreover, the directive file format allows maintainers to explicitly require archivation of -their existing files. +their existing files. @cindex archivation methods @kwindex archive @@ -786,20 +786,20 @@ their existing files. is configured using @code{archive} statement. This statement can appear either in the global scope, in which case it affects all directory pairs, or within a @code{directory} block (@pxref{directory -pairs}), where it affects only the given directory pair. +pairs}), where it affects only the given directory pair. This statement takes several arguments. The first argument specifies -the archivation type: +the archivation type: @table @asis @kwindex none@r{, archivation} @item none Disable archivation. - + @kwindex tar@r{, archivation} @item tar Use @command{tar} archive. - + @kwindex directory@r{, archivation} @item directory Use a separate directory or a directory hierarchy. @@ -831,13 +831,13 @@ file name), an exact copy of the distribution directory hierarchy will be created under it. For example, given this configuration: @smallexample -archive directory /var/backups/gnu +archive directory /var/backups/gnu @end smallexample @noindent all files from @file{/home/@/ftp/@/gnu/@/tar} will be archived in @file{/var/@/backups/@/gnu/@/tar}, and files from -@file{/home/@/ftp/@/gnu/@/tar/@/old} +@file{/home/@/ftp/@/gnu/@/tar/@/old} will be archived in @file{/var/@/backups/@/gnu/@/tar/@/old}, etc. If the directory name does not begin with a slash, it will be located @@ -852,7 +852,7 @@ archive directory .archive mean that files from @file{/home/@/ftp/@/gnu/@/tar} will be archived in the directory @file{/home/@/ftp/@/gnu/@/tar/@/.archive}, files from @file{/home/@/ftp/@/gnu/@/tar/@/old} --- in -@file{/home/@/ftp/@/gnu/@/tar/@/.archive/@/old}, etc. +@file{/home/@/ftp/@/gnu/@/tar/@/.archive/@/old}, etc. @anchor{backup-methods} @vindex version-control @r{Emacs variable} @@ -886,7 +886,7 @@ Always make simple backups. @end table @vindex VERSION_CONTROL - If no backup method is given, the value of the @env{VERSION_CONTROL} + If no backup method is given, the value of the @env{VERSION_CONTROL} environment variable will be used. And if @env{VERSION_CONTROL} is not set, the @samp{existing} is used by default. @@ -896,7 +896,7 @@ not set, the @samp{existing} is used by default. be located in the same directory as the files they belong to. To enforce this rule, @command{wydawca} implements @dfn{implicit signature archivation} facility. It works as -follows. When archivation of @var{file} is requested by +follows. When archivation of @var{file} is requested by @code{archive: @var{file}} statement in the directive file (@pxref{FTP Upload Directive File - v1.1, Standalone directives,, maintain.info, Information For Maintainers of GNU Software}), @@ -939,10 +939,10 @@ the destination directory. Apart from these obligatory statements, a methods}). Any of these statements, if present, overrides the corresponding global definition for this directory pair. A @code{directory} statement ends with the @code{end} keyword on a -separate line. +separate line. For example, the following definition says that valid uploads to -@file{/home/ftp/incoming/ftp} should be transferred to @file{/home/ftp/gnu}: +@file{/home/ftp/incoming/ftp} should be transferred to @file{/home/ftp/gnu}: @smallexample @group @@ -1005,7 +1005,7 @@ symlinks removed: 0 Each item in this statistics is configurable, and a unique configuration keyword is associated with it. The statistics items and their corresponding keywords are described in the table -below: +below: @table @code @kwindex errors@r{, statistics} @@ -1100,7 +1100,7 @@ statistics none output. This keyword may also be followed by any number of statistics keywords, which are in this case @emph{excluded} from the summary. For example, to output all statistics, except errors and -warnings one would set: +warnings one would set: @smallexample statistics all errors warnings @@ -1156,7 +1156,7 @@ mailer @var{url} @cindex mailer @acronym{URL} A mailer @acronym{URL} begins with a protocol specification. Two protocol specifications are currently supported: @samp{sendmail} -and @samp{smtp}. The former means to use a +and @samp{smtp}. The former means to use a @command{sendmail}-compatible program to send mails. Such a program must be able to read mail from its standard input and must support the following options: @@ -1189,14 +1189,14 @@ A special form of a sendmail @acronym{URL}, consisting of protocol specification only (@samp{sendmail:}) is also allowed. It means ``use the sendmail binary from the @code{_PATH_SENDMAIL} macro in your @file{/usr/include/paths.h} file''. This is the default -mailer. +mailer. The @samp{smtp} protocol means to use an @acronym{SMTP} server directly. In this case, mailer location consists of two slashes, followed by the @acronym{IP} address or host name of the @acronym{SMTP} server, and, optionally, the port number. If the port number is present, it is separated from the rest of @acronym{URL} by a colon. -For example: +For example: @smallexample @group @@ -1284,7 +1284,7 @@ The rest of arguments is a list of statistics keywords as described in counters for at least one of the requested categories are not zero. For example, the following statement requires sending notifications only if there occurred any errors or access violation -attempts, or any bad signature was uploaded: +attempts, or any bad signature was uploaded: @smallexample mail-admin-stat stat-msg errors access-violations bad-signatures @@ -1321,11 +1321,11 @@ processed. @kwindex stat:incomplete_triplets @item stat:incomplete_triplets @tab Number of incomplete triplets left in the source directory. -@kwindex stat:bad_triplets +@kwindex stat:bad_triplets @item stat:bad_triplets @tab Number of bad triplets seen. @kwindex stat:expired_triplets -@item stat:expired_triplets @tab Number of expired triplets. -@kwindex stat:triplet_success +@item stat:expired_triplets @tab Number of expired triplets. +@kwindex stat:triplet_success @item stat:triplet_success @tab Number of successfully processed triplets. @kwindex stat:uploads @@ -1347,14 +1347,14 @@ Subject: Wydawca stats This is to notify you that my run on %@{date@} caused the following results: -errors ............................. %@{stat:errors@} -warning ............................ %@{stat:warnings@} -bad signatures ..................... %@{stat:bad_signatures@} -access violation attempts .......... %@{stat:access_violations@} +errors ............................. %@{stat:errors@} +warning ............................ %@{stat:warnings@} +bad signatures ..................... %@{stat:bad_signatures@} +access violation attempts .......... %@{stat:access_violations@} Regards, Wydawca -end +end @end smallexample @node event notification @@ -1365,31 +1365,31 @@ The following @dfn{events} are tracked during the execution. Any of them can be used to trigger an email notification of any party concerned: the system administrator, project administrators, or the user that initiated the upload: - + @table @code @kwindex success @item success Successful upload. - + @kwindex bad-ownership @item bad-ownership An unauthorized user attempted to upload files for their project. - + @kwindex bad-directive-signature @item bad-directive-signature The directive signature does not match the public key of the uploader. - + @kwindex bad-detached-signature @item bad-detached-signature The detached signature does not match the public key of the uploader. @end table -@kwindex notify-event +@kwindex notify-event These notifications are configured using the following statement: -@smallexample +@smallexample notify-event @var{event} @var{who} @var{msg-id} @end smallexample @@ -1422,7 +1422,7 @@ different templates: notify-event bad-directive-signature user user-bad-directive-signature notify-event bad-directive-signature owner owner-bad-directive-signature @end smallexample - + The following macro-variables may be used in templates for these notifications: @@ -1464,7 +1464,7 @@ See below for an example. @kwindex triplet:upload @item triplet:upload -Listing of the uploaded files (see below). +Listing of the uploaded files (see below). @kwindex triplet:dist @item triplet:dist @@ -1504,11 +1504,11 @@ example, here is a possible @code{%@{triplet:full@}} listing: -rw-r--r-- gray user 62 2007-09-06 22:14:35 tar-1.18.tar.gz.directive.asc @end smallexample - + The following example shows how to configure success notification for the user: - + @smallexample # @r{Define a message template.} define-message user-success @@ -1571,7 +1571,7 @@ triplet file. @cindex backups For @samp{directive} archivation type, the optional @var{backup-method} parameter specifies how to back up an existing file whose name -coincides with the one @command{wydawca} is about to create. If +coincides with the one @command{wydawca} is about to create. If @var{backup-method} is not specified, the value of the @env{VERSION_CONTROL} environment variable will be used. And if @env{VERSION_CONTROL} is not set, the @samp{existing} method (see below) is used by default. @@ -1600,7 +1600,7 @@ Always make simple backups. @end deffn @deffn {Wydawca Statement} syslog-facility @var{facility} -Output diagnostics to the given syslog facility. The @var{facility} +Output diagnostics to the given syslog facility. The @var{facility} may be one of the following: @samp{user}, @samp{daemon}, @samp{auth}, @samp{authpriv}, @samp{local0} through @samp{local7}, and @samp{mail}. the string matching is case insensitive. optionally, @samp{log_} @@ -1684,7 +1684,7 @@ removed. The @var{interval} is a string that defines a time interval, much the same way we do this in English: it consists of one or more pairs ``@samp{number} @samp{time unit}''. For example, the following are -valid interval specifications: +valid interval specifications: @smallexample @group @@ -1712,7 +1712,7 @@ not an absolute file name, it will be searched in @env{PATH}. @end deffn @deffn {Wydawca Block Statement} sql @var{identifier} -This statement begins a MySQL database definition. It may contain +This statement begins a MySQL database definition. It may contain several sub-statements, defining how to access the database. The statement ends with the @code{end} keyword on a line by itself. @@ -1780,7 +1780,7 @@ directory [@var{url}] end @end group @end smallexample - + @noindent where optional @var{url} specifies the @acronym{URL} of the distribution site defined by this directory (for diagnostic purposes), @@ -1788,7 +1788,7 @@ distribution site defined by this directory (for diagnostic purposes), defining source and distribution directories, and @var{statements} are any optional archive and/or access method definitions, overriding the global ones for this directory pair. - + @xref{directory pairs}, for more information. The following statements must be present in a @code{directory} block: @@ -1846,7 +1846,7 @@ Sets the sender address for mail notifications. @xref{notification}, for more information on this statement. @end deffn -@deffn {Wydawca Statement} mail-admin-stat @var{msg-id} @var{condition-list} +@deffn {Wydawca Statement} mail-admin-stat @var{msg-id} @var{condition-list} Defines statistics categories that trigger statistic reports. @xref{statreports}. @@ -1883,7 +1883,7 @@ Sets the mailer @acronym{URL} to use. @cindex command line options @UNREVISED This chapter presents a short reference of all @command{wydawca} -command line options, in alphabetical order. +command line options, in alphabetical order. @table @option @opsummary{config-file} @@ -1903,7 +1903,7 @@ Log all diagnostics to syslog. @xref{stderr, The @option{--syslog} option}. @opsummary{debug} -@item --debug +@item --debug @itemx -d Increase debugging level by 1. @@ -1947,7 +1947,7 @@ exit with code 0, if the syntax is OK, and with code 1 otherwise. Print a concise usage summary and exit. @opsummary{version} -@item --version +@item --version @itemx -v Print the program version and exit. @end table @@ -1962,7 +1962,7 @@ sure to include a detailed information when reporting a bug. The minimum information needed is: @itemize -@item Program version you use (see the output of @command{wydawca --version}. +@item Program version you use (see the output of @command{wydawca --version}. @item A description of the bug. @item Conditions under which the bug appears. @item It is often helpful to send the contents of @file{config.log} diff --git a/src/builtin.c b/src/builtin.c index 7d2c276..761a01a 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -48,7 +48,7 @@ builtin_open (struct access_method *meth) #define RF_BASIC 0x2 #define STRMATCH(s, p, len) \ - (len == sizeof(s) - 1 && memcmp (s, p, sizeof(s) - 1) == 0) + (len == sizeof(s) - 1 && memcmp (s, p, sizeof(s) - 1) == 0) typedef int (*strcmp_fn) (const char *, const char *, int flags); @@ -89,7 +89,7 @@ cmp_regex (const char *pat, const char *str, int flags) rc = regexec (®ex, str, 0, NULL, 0); regfree (®ex); return rc == 0; -} +} int parse_cmp_type (const char *pat, strcmp_fn *cmpfn, int *rf) @@ -97,7 +97,7 @@ parse_cmp_type (const char *pat, strcmp_fn *cmpfn, int *rf) size_t len = strcspn (pat, ","); int flags = 0; int cmp; - + if (STRMATCH ("exact", pat, len)) cmp = CMP_EXACT; else if (STRMATCH ("fnmatch", pat, len)) @@ -117,11 +117,11 @@ parse_cmp_type (const char *pat, strcmp_fn *cmpfn, int *rf) case 'i': flags |= RF_ICASE; break; - + case 'b': flags |= RF_BASIC; break; - + default: logmsg (LOG_NOTICE, "unrecognized comparison flag: %c", *pat); } @@ -174,7 +174,7 @@ builtin_run (struct access_method *meth, void *handle, const char *req) strcmp_fn cmpfn = cmp_exact; struct builtin_data_storage *bds; int ncol = default_ncol[meth->id]; - + if (meth->parmc == 0) { meth->nrow = meth->ncol = 0; @@ -182,12 +182,12 @@ builtin_run (struct access_method *meth, void *handle, const char *req) } obstack_init (&stk); - + for (i = 0; i < meth->parmc; i++) { char *pat = meth->parmv[i]; char *val; - + if (pat[0] == '/') { pat++; @@ -197,7 +197,7 @@ builtin_run (struct access_method *meth, void *handle, const char *req) if (i + ncol >= meth->parmc) break; - + if (cmpfn (pat, req, flags)) { size_t j; @@ -239,9 +239,9 @@ builtin_run (struct access_method *meth, void *handle, const char *req) } rc = 0; } - + meth->storage = bds; - + return rc; } diff --git a/src/cmdline.opt b/src/cmdline.opt index 5b3ed22..cb269f6 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt @@ -80,7 +80,7 @@ OPTION(,E,, [<preprocess config and exit>]) BEGIN preprocess_only = 1; -END +END OPTION(dump-grammar-trace,,, [<dump configuration grammar traces>]) diff --git a/src/config.c b/src/config.c index 61cf324..c22074f 100644 --- a/src/config.c +++ b/src/config.c @@ -38,13 +38,13 @@ static struct notification *default_notification = NULL; /home/user/../smith --> /home/smith /home/user/../.. --> / ../file --> NULL -*/ +*/ char * safe_file_name (char *file_name) { int len; char *p; - + if (!file_name) return file_name; @@ -99,7 +99,7 @@ safe_file_name (char *file_name) continue; } } - + p++; } @@ -130,7 +130,7 @@ string_to (const char *what, const char *str, gconf_locus_t *locus) { ptrdiff_t x = ARGMATCH (str, args, vals); - + if (x == (ptrdiff_t)-1) { gconf_error (locus, 0, _("unknown %s: %s"), what, str); @@ -250,7 +250,7 @@ get_arg (gconf_locus_t *locus, gconf_value_t *value, unsigned n, int type) } return value; } - + static int cb_mailer (enum gconf_callback_command cmd, @@ -289,7 +289,7 @@ cb_email_address (enum gconf_callback_command cmd, { int rc; mu_address_t addr; - + if (assert_string_arg (locus, cmd, value)) return 1; rc = mu_address_create (&addr, value->v.string); @@ -310,7 +310,7 @@ cb_interval (enum gconf_callback_command cmd, int rc; time_t interval; const char *endp; - + /* FIXME 1: Support arrays */ if (assert_string_arg (locus, cmd, value)) return 1; @@ -333,7 +333,7 @@ cb_absolute_name (enum gconf_callback_command cmd, void *cb_data) { char *word; - + /* FIXME 1: Support arrays */ if (assert_string_arg (locus, cmd, value)) return 1; @@ -355,7 +355,7 @@ cb_set_umask (enum gconf_callback_command cmd, { char *p; mode_t m; - + if (assert_string_arg (locus, cmd, value)) return 1; m = strtoul (value->v.string, &p, 8) & 0777; @@ -408,13 +408,13 @@ parse_single_statmask (gconf_locus_t *locus, const gconf_value_t *val, { const char *arg; ptrdiff_t x; - + if (val->type != GCONF_TYPE_STRING) { gconf_error (locus, 0, _("expected scalar value but found list")); return 1; } - + arg = val->v.string; if (strcmp (arg, "all") == 0) @@ -429,9 +429,9 @@ parse_single_statmask (gconf_locus_t *locus, const gconf_value_t *val, *invert = 0; return 0; } - + x = ARGMATCH (arg, stat_args, stat_types); - + if (x == (ptrdiff_t)-1) { gconf_error (locus, 0, _("unknown statistics type: %s"), arg); @@ -458,11 +458,11 @@ parse_statmask (gconf_locus_t *loc, gconf_value_t *val, unsigned long *pmask) case GCONF_TYPE_STRING: err = parse_single_statmask (loc, val, &mask, &invert); break; - + case GCONF_TYPE_ARRAY: { int i; - + for (i = 0; i < val->v.arg.c; i++) { unsigned long x; @@ -485,7 +485,7 @@ parse_statmask (gconf_locus_t *loc, gconf_value_t *val, unsigned long *pmask) { const gconf_value_t *vp = p; unsigned long x; - + if (parse_single_statmask (loc, vp, &x, &invert)) err = 1; else if (invert) @@ -500,7 +500,7 @@ parse_statmask (gconf_locus_t *loc, gconf_value_t *val, unsigned long *pmask) *pmask = mask; return err; } - + static int cb_statistics (enum gconf_callback_command cmd, gconf_locus_t *locus, @@ -521,7 +521,7 @@ cb_sql_host (enum gconf_callback_command cmd, { struct sqlconn *pconn = varptr; char *p; - + if (assert_string_arg (locus, cmd, value)) return 1; @@ -569,7 +569,7 @@ cb_sql (enum gconf_callback_command cmd, { struct sqlconn *pconn; void **pdata = cb_data; - + switch (cmd) { case gconf_callback_section_begin: if (!value || value->type != GCONF_TYPE_STRING) @@ -594,7 +594,7 @@ cb_sql (enum gconf_callback_command cmd, } return 0; } - + static struct gconf_keyword sql_kw[] = { { "host", N_("host"), N_("Set SQL server hostname or IP address"), gconf_type_string, NULL, 0, cb_sql_host }, @@ -633,7 +633,7 @@ cb_define_message (enum gconf_callback_command cmd, void *cb_data) { const char *ident; - + if (cmd != gconf_callback_ |