[Refdb-cvs] CVS: refdb/src refdbc.c,1.60,1.61
Status: Beta
Brought to you by:
mhoenicka
|
From: Markus H. <mho...@us...> - 2003-12-28 21:35:20
|
Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1:/tmp/cvs-serv11154
Modified Files:
refdbc.c
Log Message:
run selectdb() on startup if a default database is specified
Index: refdbc.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/refdbc.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -U2 -r1.60 -r1.61
--- refdbc.c 24 Dec 2003 21:42:47 -0000 1.60
+++ refdbc.c 28 Dec 2003 21:35:13 -0000 1.61
@@ -763,5 +763,6 @@
if (*current_db) {
- fprintf(stderr, "I will try to use\n%s\nas the current database.\n", current_db);
+ com_selectdb(current_db);
+/* fprintf(stderr, "I will try to use\n%s\nas the current database.\n", current_db); */
LOG_PRINT(LOG_INFO, current_db);
}
@@ -1665,14 +1666,15 @@
fprintf(stdout, "\n%s selected as current database\n", arg);
}
+ return 0;
}
else {
if (!n_cgi) {
- fprintf(stderr, "No database %s. Server said: %s<<. Stop.\n", arg, slvals.inbuffer);
+ fprintf(stderr, "No database %s\n", arg);
if (n_verbose) {
fprintf(stderr, "Use listdb to see a list of available databases\n");
}
}
+ return 1;
}
- return 0;
}
@@ -2004,5 +2006,5 @@
break;
case 'h':
- printf("Displays the result of a database search.\nSyntax: getref [-c command] [-d database] [-h] [-o outfile] [-O outfile][-P] [-R pdfroot] [-s format] [-S tag] [-t output-format] {search-string|-f infile}\nSearch-string: {:XY:{<|=|!=|>}{unix-regexp}} [AND|OR|AND NOT] [...]\nwhere XY specifies the field to search in\nOptions: -c command pipe the output through command\n -d database specify the database to work with\n -h prints this mini-help\n -o outfile save the output in outfile (overwrite)\n -O outfile append the output to outfile\n -P limit search to personal interest list\n -R use pdfroot as root for path of pdf files\n -s format specify fields for screen or style for DocBook output\n -S tag sort output by tag ID (default) or PY\n -t output-format display as format scrn, html, db31, teix, ris, or bibtex\n -f infile use the saved search line in file infile\n All other arguments are interpreted as the search string.\n");
+ printf("Displays the result of a database search.\nSyntax: getref [-c command] [-d database] [-h] [-o outfile] [-O outfile][-P] [-R pdfroot] [-s format] [-S tag] [-t output-format] {search-string|-f infile}\nSearch-string: {:XY:{<|=|!=|>}{unix-regexp}} [AND|OR|AND NOT] [...]\nwhere XY specifies the field to search in\nOptions: -c command pipe the output through command\n -d database specify the database to work with\n -h prints this mini-help\n -o outfile save the output in outfile (overwrite)\n -O outfile append the output to outfile\n -P limit search to personal interest list\n -R use pdfroot as root for path of pdf files\n -s format specify fields for screen or style for DocBook output\n -S tag sort output by tag ID (default) or PY\n -t output-format display as format scrn, html, xhtml, db31, db31x, teix, ris, risx, or bibtex\n -f infile use the saved search line in file infile\n All other arguments are interpreted as the search string.\n");
delete_all_lilimem(&sentinel);
return 0;
@@ -4413,5 +4415,5 @@
break;
case 'h':
- printf("Displays the result of a database search for notes.\nSyntax: getnote [-c command] [-d database] [-h] [-o outfile] [-O outfile][-P] [-R pdfroot] [-s format] [-S tag] [-t output-format] {search-string|-f infile}\nSearch-string: {:XY:{<|=|!=|>}{unix-regexp}} [AND|OR|AND NOT] [...]\nwhere XY specifies the field to search in\nOptions: -c command pipe the output through command\n -d database specify the database to work with\n -h prints this mini-help\n -o outfile save the output in outfile (overwrite)\n -O outfile append the output to outfile\n -P limit search to personal interest list\n -R use pdfroot as root for path of pdf files\n -s format specify fields for screen or style for DocBook output\n -S tag sort output by tag ID (default) or PY\n -t output-format display as format scrn, html, db31, teix, ris, or bibtex\n -f infile use the saved search line in file infile\n All other arguments are interpreted as the search string.\n");
+ printf("Displays the result of a database search for notes.\nSyntax: getnote [-c command] [-d database] [-h] [-o outfile] [-O outfile][-P] [-R pdfroot] [-s format] [-S tag] [-t output-format] {search-string|-f infile}\nSearch-string: {:XY:{<|=|!=|>}{unix-regexp}} [AND|OR|AND NOT] [...]\nwhere XY specifies the field to search in\nOptions: -c command pipe the output through command\n -d database specify the database to work with\n -h prints this mini-help\n -o outfile save the output in outfile (overwrite)\n -O outfile append the output to outfile\n -P limit search to personal interest list\n -R use pdfroot as root for path of pdf files\n -s format specify fields for screen or style for DocBook output\n -S tag sort output by tag ID (default) or PY\n -t output-format display as format scrn, html, xhtml, or xnote\n -f infile use the saved search line in file infile\n All other arguments are interpreted as the search string.\n");
delete_all_lilimem(&sentinel);
return 0;
|