Thread: [Refdb-cvs] CVS: refdb/src refdbib.c,1.41,1.41.2.1
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2004-09-26 21:11:11
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8081/src Modified Files: Tag: Release_0_9_5_stable refdbib.c Log Message: new config variable ignore_missing Index: refdbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbib.c,v retrieving revision 1.41 retrieving revision 1.41.2.1 diff -u -U2 -r1.41 -r1.41.2.1 --- refdbib.c 11 Feb 2004 23:47:23 -0000 1.41 +++ refdbib.c 26 Sep 2004 21:10:59 -0000 1.41.2.1 @@ -64,5 +64,5 @@ /*+ this array will hold the user preferences +*/ -Prefs prefs[18] = { +Prefs prefs[19] = { {"serverip", ""}, {"port", ""}, @@ -82,4 +82,5 @@ {"startnumber", ""}, {"toencoding", ""}, + {"ignore_missing", ""}, {"", ""} }; @@ -102,4 +103,5 @@ char startnumber[PREFS_BUF_LEN] = ""; /* first number of reference */ char encoding[PREFS_BUF_LEN] = ""; /* output encoding */ +char ignore_missing[PREFS_BUF_LEN] = "f"; /* ignore missing refs */ char confdir[_POSIX_PATH_MAX+1] = ""; /* path to the config files */ @@ -206,4 +208,5 @@ prefs[15].varvalue = startnumber; prefs[16].varvalue = encoding; + prefs[17].varvalue = ignore_missing; /* a slimy hack to detect options before getopt runs */ @@ -232,5 +235,5 @@ /* read command line settings. These may override the config file settings */ - while ((n_opt = getopt(argc, argv, "c:d:D:e:E:f:hi:l:L:nN:p:qS:t:T:u:vVw:y:")) != -1) { + while ((n_opt = getopt(argc, argv, "c:d:D:e:E:f:hi:l:L:mnN:p:qS:t:T:u:vVw:y:")) != -1) { switch (n_opt) { case 'c': @@ -260,5 +263,5 @@ break; case 'h': - fprintf(stderr, "Create a bibliography file based on an ID or citation key list\nThe list must be provided as an XML document using the citationlistx DTD either on stdin or by passing the file\'s path as an argument\nUsage: refdbib [-c pager ] [-d db] [-D dir] [-e logdest] [-E encoding] [-f stdin] [-h] [-i address] [-l log-level] [-L logfile] [-n] [-N number] [-p port] [-q] [-S style] [-t type] [-T time] [-u name] [-v] [-V] [-w password] [-y confdir] file\nOptions: -c pager command\n -d use database db\n -D save driver files in dir\n -e log destination (0=stderr, 1=syslog, 2=custom file)\n -E encoding set the output character encoding\n -f stdin read data from stdin (kludge only required for Cygwin)\n -h prints this help\n -i set server IP address\n -l set the log level\n -L set the log file\n -n send no driver file\n -N start numbering bibliography entries with number\n -p set server port\n -q ignore init-file\n -S use bibliography style\n -t output type (db31|db31x|teix|bibtex)\n -T set timeout in seconds\n -u set username\n -v show version information\n -V switch to verbose mode\n -w set password\n -y look for configuration files in confdir\n"); + fprintf(stderr, "Create a bibliography file based on an ID or citation key list\nThe list must be provided as an XML document using the citationlistx DTD either on stdin or by passing the file\'s path as an argument\nUsage: refdbib [-c pager ] [-d db] [-D dir] [-e logdest] [-E encoding] [-f stdin] [-h] [-i address] [-l log-level] [-L logfile] [-m] [-n] [-N number] [-p port] [-q] [-S style] [-t type] [-T time] [-u name] [-v] [-V] [-w password] [-y confdir] file\nOptions: -c pager command\n -d use database db\n -D save driver files in dir\n -e log destination (0=stderr, 1=syslog, 2=custom file)\n -E encoding set the output character encoding\n -f stdin read data from stdin (kludge only required for Cygwin)\n -h prints this help\n -i set server IP address\n -l set the log level\n -L set the log file\n -m ignore missing references\n -n send no driver file\n -N start numbering bibliography entries with number\n -p set server port\n -q ignore init-file\n -S use bibliography style\n -t output type (db31|db31x|teix|bibtex)\n -T set timeout in seconds\n -u set username\n -v show version information\n -V switch to verbose mode\n -w set password\n -y look for configuration files in confdir\n"); exit (0); break; @@ -275,4 +278,7 @@ log_file[PREFS_BUF_LEN-1] = '\0'; break; + case 'm': + *ignore_missing = 't'; + break; case 'n': n_send_stylespec = 0; @@ -319,5 +325,5 @@ break; case ':': - fprintf(stderr, "Usage: refdbib [-c pager ] [-d db] [-D dir] [-e logdest] [-h] [-i address] [-l log-level] [-L logfile] [-n] [-p port] [-q] [-S style] [-t type] [-T time] [-u name] [-v] [-V] [-w password] [-y confdir] file\nOptions: -c pager command\n -d use database db\n -D save driver files in dir\n -e log destination (0=stderr, 1=syslog, 2=custom file)\n -h prints this help\n -i set server IP address\n -l set the log level\n -L set the log file\n -n send no driver file\n -p set server port\n -q ignore init-file\n -S use bibliography style\n -t output type (db31|db31x|teix|bibtex)\n -T set timeout in seconds\n -u set username\n -v show version information\n -V switch to verbose mode\n -w set password\n -y look for configuration files in confdir\n"); + fprintf(stderr, "Usage: refdbib [-c pager ] [-d db] [-D dir] [-e logdest] [-E encoding] [-f stdin] [-h] [-i address] [-l log-level] [-L logfile] [-m] [-n] [-N number] [-p port] [-q] [-S style] [-t type] [-T time] [-u name] [-v] [-V] [-w password] [-y confdir] file\nOptions: -c pager command\n -d use database db\n -D save driver files in dir\n -e log destination (0=stderr, 1=syslog, 2=custom file)\n -E encoding set the output character encoding\n -f stdin read data from stdin (kludge only required for Cygwin)\n -h prints this help\n -i set server IP address\n -l set the log level\n -L set the log file\n -m ignore missing references\n -n send no driver file\n -N start numbering bibliography entries with number\n -p set server port\n -q ignore init-file\n -S use bibliography style\n -t output type (db31|db31x|teix|bibtex)\n -T set timeout in seconds\n -u set username\n -v show version information\n -V switch to verbose mode\n -w set password\n -y look for configuration files in confdir\n"); exit (1); break; @@ -907,5 +913,5 @@ else { fprintf(stderr, "%s\n", inbuffer); - if (!strncmp(inbuffer, "getbib error", 12)) { + if (*ignore_missing == 'f' && !strncmp(inbuffer, "getbib error", 12)) { n_retval = 1; } |