refdb-cvs Mailing List for RefDB (Page 52)
Status: Beta
Brought to you by:
mhoenicka
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(88) |
Feb
(50) |
Mar
(36) |
Apr
(9) |
May
(30) |
Jun
(30) |
Jul
(22) |
Aug
(16) |
Sep
(42) |
Oct
(18) |
Nov
(29) |
Dec
(23) |
2005 |
Jan
(18) |
Feb
(28) |
Mar
(21) |
Apr
(35) |
May
(62) |
Jun
(22) |
Jul
(5) |
Aug
(40) |
Sep
(98) |
Oct
(81) |
Nov
(51) |
Dec
(62) |
2006 |
Jan
(46) |
Feb
(36) |
Mar
(8) |
Apr
(16) |
May
(14) |
Jun
(16) |
Jul
(47) |
Aug
(60) |
Sep
(34) |
Oct
(16) |
Nov
(46) |
Dec
(11) |
2007 |
Jan
(16) |
Feb
(13) |
Mar
(58) |
Apr
(32) |
May
(4) |
Jun
(8) |
Jul
(31) |
Aug
(46) |
Sep
(22) |
Oct
(30) |
Nov
(58) |
Dec
(15) |
2008 |
Jan
(8) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(3) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(6) |
Nov
(3) |
Dec
(5) |
2009 |
Jan
(1) |
Feb
(20) |
Mar
(8) |
Apr
(5) |
May
(8) |
Jun
(3) |
Jul
(6) |
Aug
(4) |
Sep
(7) |
Oct
(8) |
Nov
(2) |
Dec
(1) |
2010 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
(5) |
Feb
(5) |
Mar
(13) |
Apr
(3) |
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(5) |
Nov
|
Dec
(3) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(13) |
2014 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(6) |
Sep
(3) |
Oct
|
Nov
(2) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
(9) |
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Markus H. <mho...@us...> - 2005-06-22 19:49:30
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1395 Added Files: refdb-mode-config.el Log Message: initial version --- NEW FILE --- ;; refdb-mode and ris-mode configuration file example ;; adapt the settings to your needs and include this ;; file into your .emacs (or site-start.el) by inserting ;; the following command, using the real path of course: ;; (load-file "/path/to/refdb-mode-config.el") ;; Alternatively, copy the following lines directly ;; into your .emacs or site-start.el ;; load the editing mode for RIS files and associate .ris files ;; with this mode (autoload 'ris-mode "ris" "Major mode for RIS bibliography files." t) (or (assoc "\\.ris$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.ris$" . ris-mode) auto-mode-alist))) ;; load refdb-mode (require 'refdb-mode) ;; set the default reference database (setq refdb-database "default") ;; invoke refdb-mode automatically with these major modes (add-hook 'ris-mode-hook 'refdb-mode) (add-hook 'nxml-mode-hook 'refdb-mode) (add-hook 'bibtex-mode-hook 'refdb-mode) (add-hook 'psgml-mode-hook 'refdb-mode) (add-hook 'sgml-mode-hook 'refdb-mode) (add-hook 'refdb-output-mode-hook 'refdb-mode) |
From: Markus H. <mho...@us...> - 2005-06-22 19:36:48
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27631 Modified Files: refdb-mode.el Log Message: keep a list of styles for tab-completion;support creating documents via refdbnd;support document transformation via refdbnd-generated Makefile;support viewing transformation output;added commands to cite references in TEI and DocBook formats Index: refdb-mode.el =================================================================== RCS file: /cvsroot/refdb/elisp/refdb-mode.el,v retrieving revision 1.13 retrieving revision 1.14 diff -u -U2 -r1.13 -r1.14 --- refdb-mode.el 12 Jun 2005 21:18:25 -0000 1.13 +++ refdb-mode.el 22 Jun 2005 19:36:39 -0000 1.14 @@ -184,4 +184,6 @@ ;; Pick References ;; Dump References +;; Convert References > +;; Cite References > ;; Add Notes ;; Update Notes @@ -193,5 +195,5 @@ ;; Customize Data Output > ;; Select Database > -;; Database Info +;; Show Database Info [...1007 lines suppressed...] + (setq refdb-view-output-submenu-definition + (cons "View Output" ;; turn quoted contents value back into a real list (mapcar (lambda (item) (if (symbolp item) (eval item) item)) val) @@ -4941,4 +5672,6 @@ refdb-pickref-menu-item refdb-dumpref-menu-item + refdb-convert-submenu-definition + refdb-cite-references-submenu-definition refdb-menu-item-separator4 refdb-addnote-menu-item @@ -4954,5 +5687,7 @@ refdb-whichdb-menu-item refdb-menu-item-separator4 - refdb-convert-submenu-definition + refdb-create-document-submenu-definition + refdb-transform-submenu-definition + refdb-view-output-submenu-definition refdb-menu-item-separator4 refdb-administration-submenu-definition |
From: Markus H. <mho...@us...> - 2005-06-13 19:55:56
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30735 Modified Files: refdbn.css Log Message: added legend table cells Index: refdbn.css =================================================================== RCS file: /cvsroot/refdb/homepage/refdbn.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -U2 -r1.2 -r1.3 --- refdbn.css 24 Dec 2004 15:31:10 -0000 1.2 +++ refdbn.css 13 Jun 2005 19:55:48 -0000 1.3 @@ -207,2 +207,10 @@ margin-left: 20px; } +p.authors { + font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; + font-size: small; +} +td.legend { + font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif; + font-size: small; +} |
From: Markus H. <mho...@us...> - 2005-06-13 19:55:30
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30162 Modified Files: addons.html Log Message: updated for refdb-mode 1.13; added a couple of images Index: addons.html =================================================================== RCS file: /cvsroot/refdb/homepage/addons.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -U2 -r1.5 -r1.6 --- addons.html 18 May 2005 11:13:25 -0000 1.5 +++ addons.html 13 Jun 2005 19:55:18 -0000 1.6 @@ -140,5 +140,5 @@ <h2 id="ris-mode">Emacs ris-mode</h2> - <p>Author: Markus Hoenicka <mho...@us...></p> + <p class="authors">Author: Markus Hoenicka <mho...@us...></p> <p><b><a href="addons/ris.el">Download ris.el (1.9)</a></b></p> <p>If your editor of choice should be <a href="http://directory.fsf.org/emacs.html">Emacs</a> or <a href="http://www.xemacs.org/">XEmacs</a>, the RIS major mode (ris.el) will make editing RIS datasets a little bit more comfortable. Font-locking will help you to spot syntax errors. Especially the end tag (ER - ) is prone to lack the trailing space if you're not careful. The ris-mode displays valid tags in blue, except the special type (TY - ) and end (ER - ) tags which are shown in red. The tag contents are colored according to several criteria. If the contents of a field is limited in length, the color will extend only up to that limit. Author/editor, publication date, and reprint fields are checked for a valid content. ris-mode also provides the following commands:</p> @@ -161,16 +161,51 @@ <h2 id="refdb-mode">Emacs refdb-mode</h2> - <p>Author: Michael Smith <xm...@us...></p> - <p><b><a href="addons/refdb-mode.el">Download refdb-mode.el (1.10)</a></b></p> - <p>This minor mode for <a href="http://directory.fsf.org/emacs.html">Emacs</a> and <a href="http://www.xemacs.org/">XEmacs</a> is a frontend for the most common RefDB commands. It works nicely alongside the major modes ris-mode, <a href="http://www.thaiopensource.com/nxml-mode/">nxml-mode</a>, and <a href="http://sourceforge.net/projects/psgml/">PSGML</a>. It provides menu entries to add, update, delete, and search for references. Retrieved references in either RIS or risx format can be edited in place and subsequently be updated in the database. HTML and XHTML output can be sent to a browser of your choice (including the built-in <a href="http://www.cs.indiana.edu/elisp/w3/docs.html">w3 mode</a>) automatically.</p> + <p class="authors">Author: Michael Smith <xm...@us...>, Maintainer: Markus Hoenicka <mho...@us...></p> + <p><b><a href="addons/refdb-mode.el">Download refdb-mode.el (1.13)</a></b></p> + <p>This minor mode for <a href="http://directory.fsf.org/emacs.html">Emacs</a> and <a href="http://www.xemacs.org/">XEmacs</a> is a frontend for most RefDB commands.</p> + <ul> + <li>It works nicely alongside the major modes ris-mode, <a href="http://www.thaiopensource.com/nxml-mode/">nxml-mode</a>, and <a href="http://sourceforge.net/projects/psgml/">PSGML</a>. refdb-mode can be automatically activated in these modes, and commands that return data in either of these formats set the appropriate mode automatically.</li> + <li>It provides menu entries to add, update, delete, and search for references and notes. Retrieved references and notes in either RIS or risx format can be edited in place and subsequently be updated in the database.</li> + <li>Queries using author names, periodical names, or keywords are simplified by tab-completion.</li> + <li>You can run queries on a selected region. E.g. you can highlight a word or a phrase in the title of a reference and see whether references exist that use this word or phrase as a keyword.</li> + <li>Reference data in formats that RefDB cannot natively import or generate can be converted by Chris Putnam's <a href="http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html">bibutils</a> via menu commands.</li> + <li>HTML and XHTML output can be sent to a browser of your choice (including the built-in <a href="http://www.cs.indiana.edu/elisp/w3/docs.html">w3 mode</a>) automatically.</li> + <li>A menu shows the databases that the current user has permissions to access.</li> + <li>A full range of administrative commands helps the RefDB administrator to get his work done. This includes the control of the application server and shortcuts to edit the RefDB configuration files.Administration is simplified by tab-completion for filenames and for character encodings.</li> + <li>Bibliographic styles can be added, retrieved, and directly edited.</li> + </ul> <p>To install this mode on your system, follow the instructions in the elisp code.</p> - <p class="legend"><a href="refdbmode.png"><img alt="Emacs refdb-mode" src="refdbmode-small.jpg"/></a></p> - <p class="legend"><strong>Fig. 2:</strong> Emacs refdb-mode. Click on the image to see a <a href="refdbmode.png">larger version</a>. The menu allows easy access to the most common reference manipulation commands.</p> + + + <p class="legend"><a href="refdb-mode-getref1.png"><img alt="Emacs refdb-mode" src="refdb-mode-getref1-small.jpg"/></a></p> + <p class="legend"><strong>Fig. 2a:</strong> Emacs refdb-mode, showing the available menu commands to retrieve references. The two buffers show the result of retrieving references in risx format. The output buffer contains the data proper, which can be edited and validated using the automatically invoked nXML mode. The messages buffer contains the command summaries of the most recent commands. Click on the image to see a <a href="refdb-mode-getref1.png">larger version</a>.</p> + + <table summary="refdb-mode screenshots"> + <tr valign="bottom"> + <td><a href="refdb-mode-getref-region.png"><img alt="Emacs refdb-mode" src="refdb-mode-getref-region-tiny.jpg"/></a> + </td> + <td><a href="refdb-mode-getnote1.png"><img alt="Emacs refdb-mode" src="refdb-mode-getnote1-tiny.jpg"/></a> + </td> + <td><a href="refdb-mode-selectdb1.png"><img alt="Emacs refdb-mode" src="refdb-mode-selectdb1-tiny.jpg"/></a> + </td> + <td><a href="refdb-mode-convert.png"><img alt="Emacs refdb-mode" src="refdb-mode-convert-tiny.jpg"/></a> + </td> + <td><a href="refdb-mode-admin1.png"><img alt="Emacs refdb-mode" src="refdb-mode-admin1-tiny.jpg"/></a> + </td> + </tr> + <tr valign="top"> + <td class="legend"><strong>Fig 2b: </strong>Use a marked region of text as a query string</td> + <td class="legend"><strong>Fig 2c: </strong>Retrieve extended notes in a similar way as references.</td> + <td class="legend"><strong>Fig 2d: </strong>Select from the list of available databases.</td> + <td class="legend"><strong>Fig 2e: </strong>Import external reference data, like the MODS dataset shown here.</td> + <td class="legend"><strong>Fig 2f: </strong>The administrative commands.</td> + </tr> + </table> <h2 id="vim">Vim syntax, filetype and plugin files</h2> - <p>Author: David Nebauer <dav...@sw...></p> + <p class="authors">Author: David Nebauer <dav...@sw...></p> <p><b><a href="addons/vimhelper-1.0.tar.gz">Download vimhelper.tar.gz (1.0)</a></b></p> <p>If <a href="http://www.vim.org">Vim</a> is the editor of your choice, this set of files comes in handy to edit RIS files.</p> @@ -206,5 +241,5 @@ <h2 id="makestyle">Makestyle (bibliography style generator)</h2> - <p>Author: David Nebauer <dav...@sw...></p> + <p class="authors">Author: David Nebauer <dav...@sw...></p> <p><b><a href="addons/makestyle-1.0.tar.gz">Download makestyle.tar.gz (1.0)</a></b></p> <p>refdb-ms is a Perl script which helps to write bibliography and citation style specifications for RefDB from scratch. If a regular XML editor does not feel right for you, try this script. It shows valid elements at the current point, just like an XML editor would do, but provides additional help about the purpose of each element.</p> @@ -216,5 +251,5 @@ <h2 id="perlmod">Perl client module</h2> - <p>Author: Markus Hoenicka <mho...@us...></p> + <p class="authors">Author: Markus Hoenicka <mho...@us...></p> <p><b><a href="pre/RefDBClient-Client-1.11.tar.gz">Download RefDBClient-Client-1.11.tar.gz</a></b></p> <p><b>Note:</b>This version requires <a href="pre/refdb-latest.tar.gz">refdb-0.9.6-pre2 or later</a> or a current CVS version of RefDB.</p> |
From: Markus H. <mho...@us...> - 2005-06-12 21:18:33
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15968 Modified Files: refdb-mode.el Log Message: added support for author,keyword,and periodical tab completion;rearranged customization stuff into subgroups;added support for getref on regions;added support for bibutils Index: refdb-mode.el =================================================================== RCS file: /cvsroot/refdb/elisp/refdb-mode.el,v retrieving revision 1.12 retrieving revision 1.13 diff -u -U2 -r1.12 -r1.13 --- refdb-mode.el 7 Jun 2005 20:07:33 -0000 1.12 +++ refdb-mode.el 12 Jun 2005 21:18:25 -0000 1.13 @@ -2,5 +2,6 @@ ;; $Id$ -;; Copyright (C) 2003 Michael Smith +;; Copyright (C) 2003-2005 Michael Smith +;; Copyright (C) 2005 Markus Hoenicka ;; Author: Michael Smith <sm...@si...> @@ -35,5 +36,5 @@ ;;------------------------------------------------------------------- ;; This package provides a menu-driven Emacs front-end for -;; interacting with Markus Hoenicka's RefDB reference database and [...2074 lines suppressed...] refdb-menu-item-separator4 refdb-show-messages-menu-item refdb-show-version-menu-item - refdb-customize-menu-item - refdb-customize-submenu-definition ) "*Contents of command `refdb-mode' menu. @@ -3999,5 +4971,5 @@ ) ) - :group 'refdb + :group 'refdb-menu-definitions :type '(repeat variable) ) @@ -4008,4 +4980,5 @@ ;; ******************************************************************* + (define-key-after menu-bar-tools-menu [refdb-mode-toggle] ;; add "RefDB Mode" item to Tools menu |
From: Markus H. <mho...@us...> - 2005-06-12 21:09:40
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12022 Modified Files: Tag: Release_0_9_5_stable refdbdref.c Log Message: getref():added support for AX pseudo target; added TX as a synonym for TA pseudo target Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.11 retrieving revision 1.65.2.12 diff -u -U2 -r1.65.2.11 -r1.65.2.12 --- refdbdref.c 9 Jun 2005 19:10:33 -0000 1.65.2.11 +++ refdbdref.c 12 Jun 2005 21:09:29 -0000 1.65.2.12 @@ -2232,4 +2232,7 @@ author_type = 3; } + else if (strncmp(buffer, ":AX:", 4) == 0) { + author_type = 4; + } else { author_type = 0; @@ -2244,4 +2247,7 @@ newtoken = sqltoken.next_token; if (token != NULL) { + char author_type_start[64]; + char author_type_end[4]; + strncpy(buffer, token, sqltoken.length); buffer[sqltoken.length] ='\0'; /* terminate string */ @@ -2250,8 +2256,22 @@ if (token != NULL) { + /* prepare bits and pieces for AND/OR queries*/ + if (author_type == 4) { /* any type of author */ + *author_type_start = '\0'; + strcpy(author_type_end, ") "); + } + else { /* particular type of author */ + sprintf(author_type_start, "(t_xauthor.xauthor_type=%s AND ", get_author_type_string(driver, author_type)); + strcpy(author_type_end, ")) "); + } + /* plain query with one author */ if (*token != '&' && *token != '|') { - sprintf(sql_command, "SELECT DISTINCT t_xauthor.refdb_id FROM t_xauthor, t_author WHERE t_author.author_id=t_xauthor.author_id AND t_xauthor.xauthor_type=%s AND t_author.author_name %s ", get_author_type_string(driver, author_type), (*operator == '=' || (*operator == '!' && *(operator+1) == '=')) ? "=" : my_dbi_conn_get_cap(conn, "rlike")); - + if (author_type == 4) { /* any type of author */ + sprintf(sql_command, "SELECT DISTINCT t_xauthor.refdb_id FROM t_xauthor, t_author WHERE t_author.author_id=t_xauthor.author_id AND t_author.author_name %s ", (*operator == '=' || (*operator == '!' && *(operator+1) == '=')) ? "=" : my_dbi_conn_get_cap(conn, "rlike")); + } + else { /* particular type of author */ + sprintf(sql_command, "SELECT DISTINCT t_xauthor.refdb_id FROM t_xauthor, t_author WHERE t_author.author_id=t_xauthor.author_id AND t_xauthor.xauthor_type=%s AND t_author.author_name %s ", get_author_type_string(driver, author_type), (*operator == '=' || (*operator == '!' && *(operator+1) == '=')) ? "=" : my_dbi_conn_get_cap(conn, "rlike")); + } quoted_token = mstrdup(token); if (!quoted_token) { @@ -2277,5 +2297,5 @@ /* OR query with several authors */ else if (*token == '|') { - sprintf(sql_command, "SELECT DISTINCT t_xauthor.refdb_id FROM t_xauthor, t_author WHERE (t_xauthor.xauthor_type=%s AND (", get_author_type_string(driver, author_type)); + sprintf(sql_command, "SELECT DISTINCT t_xauthor.refdb_id FROM t_xauthor, t_author WHERE %s (", author_type_start); while (token != NULL) { @@ -2331,5 +2351,5 @@ } else { - if ((new_sql_command = mstrcat(sql_command, ")) ", &sql_command_len, 4)) == NULL) { + if ((new_sql_command = mstrcat(sql_command, author_type_end, &sql_command_len, 4)) == NULL) { retval = 1; break; @@ -2356,5 +2376,5 @@ else if (*token == '&') { counter = 0; - sprintf(sql_command, "SELECT DISTINCT t_xauthor.refdb_id, COUNT(*) AS count FROM t_xauthor, t_author WHERE (t_xauthor.xauthor_type=%s AND (", get_author_type_string(driver, author_type)); + sprintf(sql_command, "SELECT DISTINCT t_xauthor.refdb_id, COUNT(*) AS count FROM t_xauthor, t_author WHERE %s (", author_type_start); while (token != NULL) { @@ -2411,5 +2431,5 @@ } else { - if ((new_sql_command = mstrcat(sql_command, ")) ", &sql_command_len, 4)) == NULL) { + if ((new_sql_command = mstrcat(sql_command, author_type_end, &sql_command_len, 4)) == NULL) { retval = 1; break; @@ -2936,5 +2956,6 @@ /*----------------------------------------------------------------*/ /* search in all titles */ - else if (strncmp(token, ":TA:", 4) == 0) { /* all titles query */ + else if (strncmp(token, ":TA:", 4) == 0 /* deprecated */ + || strncmp(token, ":TX:", 4) == 0) { /* all titles query */ char table[3][27] = {"t_refdb.refdb_title", "t_refdb.refdb_booktitle", |
From: Markus H. <mho...@us...> - 2005-06-09 19:10:49
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21351 Modified Files: Tag: Release_0_9_5_stable refdbdref.c Log Message: getref(): add support for the JF pseudo target Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.10 retrieving revision 1.65.2.11 diff -u -U2 -r1.65.2.10 -r1.65.2.11 --- refdbdref.c 29 May 2005 19:35:37 -0000 1.65.2.10 +++ refdbdref.c 9 Jun 2005 19:10:33 -0000 1.65.2.11 @@ -2762,64 +2762,34 @@ /*----------------------------------------------------------------*/ /* journal */ - else if (strncmp(token, ":JO:", 4) == 0 || strncmp(token, ":JF:", 4) == 0 || strncmp(token, ":J1:", 4) == 0 || strncmp(token, ":J2:", 4) == 0) { /* periodical query */ + else if (strncmp(token, ":JO:", 4) == 0 + || strncmp(token, ":JF:", 4) == 0 + || strncmp(token, ":J1:", 4) == 0 + || strncmp(token, ":J2:", 4) == 0 + || strncmp(token, ":JX:", 4) == 0) { /* periodical query */ + char my_token[5]; /* backup of token */ + char my_bool[4]; + strncpy(my_token, token, 4); + my_token[4] = '\0'; strncpy(operator, &token[4], sqltoken.length-4); /* save the comparison operator */ operator[sqltoken.length-4] = '\0'; /* terminate string */ - /* assemble a surrogate subselect query */ - if (strncmp(token, ":JF:", 4) == 0) { - strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_name"); - } - else if (strncmp(token, ":JO:", 4) == 0) { - strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_abbrev"); - } - else if (strncmp(token, ":J1:", 4) == 0) { - strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_custabbrev1"); - } - else { /* :J2: */ - strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_custabbrev2"); - } - /* translate operator to regexp operator */ if (*operator == '=') { -/* sprintf(bitsandpieces, " %s ", my_dbi_conn_get_cap(conn, "rlike")); */ - if ((new_sql_command = mstrcat(sql_command, " = ", &sql_command_len, 0)) == NULL) { - retval = 1; - break; - } - else { - sql_command = new_sql_command; - } + strcpy(bitsandpieces, " = "); + strcpy(my_bool, "OR"); } else if (*operator == '~') { sprintf(bitsandpieces, " %s ", my_dbi_conn_get_cap(conn, "rlike")); - if ((new_sql_command = mstrcat(sql_command, bitsandpieces, &sql_command_len, 0)) == NULL) { - retval = 1; - break; - } - else { - sql_command = new_sql_command; - } + strcpy(my_bool, "OR"); } else if (*(operator+1) == '=') { -/* sprintf(bitsandpieces, " %s ", my_dbi_conn_get_cap(conn, "not_rlike")); */ - if ((new_sql_command = mstrcat(sql_command, " != ", &sql_command_len, 0)) == NULL) { - retval = 1; - break; - } - else { - sql_command = new_sql_command; - } + strcpy(bitsandpieces, " != "); + strcpy(my_bool, "AND"); } else { /* treat all other operators as non-equal regexp*/ sprintf(bitsandpieces, " %s ", my_dbi_conn_get_cap(conn, "not_rlike")); - if ((new_sql_command = mstrcat(sql_command, bitsandpieces, &sql_command_len, 0)) == NULL) { - retval = 1; - break; - } - else { - sql_command = new_sql_command; - } + strcpy(my_bool, "AND"); } - + token = sql_tokenize(newtoken, &sqltoken); newtoken = sqltoken.next_token; @@ -2842,7 +2812,17 @@ break; } - if ((new_sql_command = mstrcat(sql_command, quoted_token, &sql_command_len, 0)) == NULL) { + } + else { + quoted_token = mstrdup(""); + } + + /* assemble a surrogate subselect query */ + if (strncmp(my_token, ":JX:", 4) == 0) { + char jxbuffer[2048]; + snprintf(jxbuffer, 2048, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND (t_periodical.periodical_name%s%s %s t_periodical.periodical_abbrev%s%s %s t_periodical.periodical_custabbrev1%s%s %s t_periodical.periodical_custabbrev2%s%s)", bitsandpieces, quoted_token, my_bool, bitsandpieces, quoted_token, my_bool, bitsandpieces, quoted_token, my_bool, bitsandpieces, quoted_token); + free(quoted_token); + *sql_command = '\0'; + if ((new_sql_command = mstrcat(sql_command, jxbuffer, &sql_command_len, 0)) == NULL) { retval = 1; - free(quoted_token); break; } @@ -2850,8 +2830,41 @@ sql_command = new_sql_command; } - free(quoted_token); } - LOG_PRINT(LOG_DEBUG, sql_command); + else { + if (strncmp(my_token, ":JF:", 4) == 0) { + strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_name"); + } + else if (strncmp(my_token, ":JO:", 4) == 0) { + strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_abbrev"); + } + else if (strncmp(my_token, ":J1:", 4) == 0) { + strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_custabbrev1"); + } + else if (strncmp(my_token, ":J2:", 4) == 0){ + strcpy(sql_command, "SELECT t_refdb.refdb_periodical_id FROM t_refdb, t_periodical WHERE t_periodical.periodical_id=t_refdb.refdb_periodical_id AND t_periodical.periodical_custabbrev2"); + } + if ((new_sql_command = mstrcat(sql_command, bitsandpieces, &sql_command_len, 0)) == NULL) { + retval = 1; + break; + } + else { + sql_command = new_sql_command; + } + + if (quoted_token != NULL) { + if ((new_sql_command = mstrcat(sql_command, quoted_token, &sql_command_len, 0)) == NULL) { + retval = 1; + free(quoted_token); + break; + } + else { + sql_command = new_sql_command; + } + free(quoted_token); + } + } /* end if JX */ + + LOG_PRINT(LOG_DEBUG, sql_command); dbires = dbi_conn_query(conn, sql_command); if (!dbires) { |
From: Markus H. <mho...@us...> - 2005-06-07 20:07:41
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19239 Modified Files: refdb-mode.el Log Message: added commands to start and stop the application server;added commands to edit config files;added encodings;added pickref and dumpref commands;added whichdb command;added addlink and deletelink commands;fixed buffer modes for output Index: refdb-mode.el =================================================================== RCS file: /cvsroot/refdb/elisp/refdb-mode.el,v retrieving revision 1.11 retrieving revision 1.12 diff -u -U2 -r1.11 -r1.12 --- refdb-mode.el 31 May 2005 21:05:00 -0000 1.11 +++ refdb-mode.el 7 Jun 2005 20:07:33 -0000 1.12 @@ -55,4 +55,35 @@ ;; ;; ------------------------------------------------------------------- +;;; Prerequisites +;; ------------------------------------------------------------------- +;; +;; refdb-mode is a front-end to the command-line utilities of RefDB. +;; For refdb-mode to work at all, you need a working RefDB +;; installation on your box. The minimum requirement is that the +;; client refdbc is installed on your system and set up to talk to a +;; refdbd server by means of a system-wide or user configuration +;; file. This file must contain the RefDB username and the password, [...1735 lines suppressed...] + refdb-dumpref-menu-item + refdb-menu-item-separator4 refdb-addnote-menu-item refdb-updatenote-menu-item refdb-deletenote-menu-item refdb-getnote-submenu-definition + refdb-addlink-menu-item + refdb-deletelink-menu-item + refdb-menu-item-separator4 refdb-data-output-submenu-definition refdb-selectdb-submenu-contents + refdb-whichdb-menu-item refdb-menu-item-separator4 refdb-administration-submenu-definition @@ -3299,4 +3987,5 @@ refdb-show-version-menu-item refdb-customize-menu-item + refdb-customize-submenu-definition ) "*Contents of command `refdb-mode' menu. |
From: Markus H. <mho...@us...> - 2005-06-05 00:51:38
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19420 Modified Files: Tag: Release_0_9_5_stable refdba.c Log Message: fixed incorrect loop counter Index: refdba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdba.c,v retrieving revision 1.45.2.5 retrieving revision 1.45.2.6 diff -u -U2 -r1.45.2.5 -r1.45.2.6 --- refdba.c 21 May 2005 23:48:11 -0000 1.45.2.5 +++ refdba.c 5 Jun 2005 00:51:18 -0000 1.45.2.6 @@ -1963,5 +1963,5 @@ /* PHASE 5 */ /* signal server that this file is done */ - if (k == inargc-1) { + if (k == numcycles-1) { /* this file is done, and it was the last one */ send_status(n_sockfd, 402, TERM_NO); |
From: Markus H. <mho...@us...> - 2005-06-05 00:51:23
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19079 Modified Files: Tag: Release_0_9_5_stable backend.c Log Message: fixed invalid header for xhtml Index: backend.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.c,v retrieving revision 1.27.2.1 retrieving revision 1.27.2.2 diff -u -U2 -r1.27.2.1 -r1.27.2.2 --- backend.c 5 May 2005 17:21:11 -0000 1.27.2.1 +++ backend.c 5 Jun 2005 00:50:43 -0000 1.27.2.2 @@ -90,5 +90,5 @@ } else { /* REFXHTML */ - snprintf(header, header_len, "<?xml version=\"1.0\" encoding=\"%s\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>%s<title>%s reference list</title><meta name=\"generator\" content=\"%s %s\" id=\"generator\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n</head>\n<body>\n<h1 class='h1'>refdb reference list</h1>\n", ptr_rendinfo->ptr_biblio_info->encoding, enc_string, PACKAGE, PACKAGE, VERSION, ptr_rendinfo->cgi_url); + snprintf(header, header_len, "<?xml version=\"1.0\" encoding=\"%s\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>%s<title>%s reference list</title><meta name=\"generator\" content=\"%s %s\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n</head>\n<body>\n<h1 class='h1'>refdb reference list</h1>\n", ptr_rendinfo->ptr_biblio_info->encoding, enc_string, PACKAGE, PACKAGE, VERSION, ptr_rendinfo->cgi_url); } } @@ -98,5 +98,5 @@ } else { /* REFXHTML */ - snprintf(header, header_len, "<?xml version=\"1.0\" encoding=\"%s\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>%s<title>%s reference list</title><meta name=\"generator\" content=\"%s %s\" id=\"generator\" /></head>\n<body>\n<h1 class='h1'>refdb reference list</h1>\n", ptr_rendinfo->ptr_biblio_info->encoding, enc_string, PACKAGE, PACKAGE, VERSION); + snprintf(header, header_len, "<?xml version=\"1.0\" encoding=\"%s\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>%s<title>%s reference list</title><meta name=\"generator\" content=\"%s %s\" /></head>\n<body>\n<h1 class='h1'>refdb reference list</h1>\n", ptr_rendinfo->ptr_biblio_info->encoding, enc_string, PACKAGE, PACKAGE, VERSION); } } |
From: Markus H. <mho...@us...> - 2005-06-02 20:56:16
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13517 Modified Files: Tag: Release_0_9_5_stable refdbc.c Log Message: allow whichdb in batch mode Index: refdbc.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbc.c,v retrieving revision 1.72.2.7 retrieving revision 1.72.2.8 diff -u -U2 -r1.72.2.7 -r1.72.2.8 --- refdbc.c 5 May 2005 17:25:58 -0000 1.72.2.7 +++ refdbc.c 2 Jun 2005 20:55:53 -0000 1.72.2.8 @@ -3394,9 +3394,4 @@ slvals.outpipe = NULL; - if (n_batchmode) { /* this does not make sense in batch mode */ - fprintf(stderr, "not a valid command in batchmode. use the -d option instead\n"); - return 0; - } - if (strncmp(arg, "-h", 2) == 0) { printf("Prints the name of the current database and some database information\nSyntax: whichdb [-h]\nOptions: -h prints this mini-help\n"); |
From: Markus H. <mho...@us...> - 2005-06-01 19:10:01
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22971 Modified Files: Tag: Release_0_9_5_stable refdb.dump.pgsql.in Log Message: replaced DATETIME with TIMESTAMP to make newer PostgreSQL versions happy Index: refdb.dump.pgsql.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/Attic/refdb.dump.pgsql.in,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -U2 -r1.1.2.2 -r1.1.2.3 --- refdb.dump.pgsql.in 11 Feb 2005 22:19:05 -0000 1.1.2.2 +++ refdb.dump.pgsql.in 1 Jun 2005 19:09:48 -0000 1.1.2.3 @@ -344,6 +344,6 @@ meta_version TEXT, meta_dbversion SMALLINT, - meta_create_date DATETIME, - meta_modify_date DATETIME + meta_create_date TIMESTAMP, + meta_modify_date TIMESTAMP ); |
From: Markus H. <mho...@us...> - 2005-05-31 21:05:08
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5841 Modified Files: refdb-mode.el Log Message: made selectdb a dynamic submenu;added support for all refdba commands;added support for refdbc note commands;addref,updateref,addstyle now work on whole buffer for XML data;deleteref,deletenote ask for ID list instead of using region;automatically set encoding of output buffer;made sure refdb-mode is loaded after commands have finished;new major mode refdb-output-mode Index: refdb-mode.el =================================================================== RCS file: /cvsroot/refdb/elisp/refdb-mode.el,v retrieving revision 1.10 retrieving revision 1.11 diff -u -U2 -r1.10 -r1.11 --- refdb-mode.el 17 May 2005 21:08:31 -0000 1.10 +++ refdb-mode.el 31 May 2005 21:05:00 -0000 1.11 @@ -5,7 +5,6 @@ ;; Author: Michael Smith <sm...@si...> -;; Maintainer: Michael Smith <sm...@si...> +;; Maintainer: (1.10-current) Markus Hoenicka <ma...@mh...> ;; Created: 2003-11-04 -;; Version: 0.90 ;; Revision: $Revision$ ;; Date: $Date$ @@ -31,4 +30,5 @@ ;; Boston, MA 02111-1307, USA. [...2518 lines suppressed...] + ;; errors + ("^\\(209:\\|239:\\|253:\\|255:\\|410:\\|411:\\|412:\\|414:\\|416:\\|417:\\|420:\\).*" 1 'refdb-output-error-face t) + + ;; warnings + ("^\\(252:\\|409:\\|415:\\|418:\\|422:\\|423:\\|424:\\).*" 1 'refdb-output-warning-face t) + ) + "Keyword highlighting specification for `refdb-output-mode'.") + +(require 'derived) + +;;;###autoload +(define-derived-mode refdb-output-mode fundamental-mode "refdb-output" + "A major mode for displaying RefDB plain-text output." + (set (make-local-variable 'font-lock-defaults) + '(refdb-output-font-lock-keywords)) +) + +(provide 'refdb-output-mode) + ;;; refdb-mode.el ends here |
From: Markus H. <mho...@us...> - 2005-05-31 17:59:28
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6373 Modified Files: Tag: Release_0_9_5_stable risxhandler.c Log Message: fixed title handling for non-journal types Index: risxhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risxhandler.c,v retrieving revision 1.28.2.7 retrieving revision 1.28.2.8 diff -u -U2 -r1.28.2.7 -r1.28.2.8 --- risxhandler.c 29 May 2005 22:32:51 -0000 1.28.2.7 +++ risxhandler.c 31 May 2005 17:59:20 -0000 1.28.2.8 @@ -740,5 +740,12 @@ } else if (!strcmp(ptr_ardata->type, "JOUR") - || !strcmp(ptr_ardata->type, "JFULL")) { + || !strcmp(ptr_ardata->type, "JFULL") + || !strcmp(ptr_ardata->type, "ABST") + || !strcmp(ptr_ardata->type, "ELEC") + || !strcmp(ptr_ardata->type, "INPR") + || !strcmp(ptr_ardata->type, "ICOMM") + || !strcmp(ptr_ardata->type, "MGZN") + || !strcmp(ptr_ardata->type, "NEWS") + || !strcmp(ptr_ardata->type, "GEN")) { if (((ptr_ardata->perinfo).full = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string(ptr_ardata->driver, &((ptr_ardata->perinfo).full)) == -1) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { |
From: Markus H. <mho...@us...> - 2005-05-31 17:57:28
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5245 Modified Files: Tag: Release_0_9_5_stable backend-risx.c Log Message: fixed reprint date output Index: backend-risx.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-risx.c,v retrieving revision 1.30.2.5 retrieving revision 1.30.2.6 diff -u -U2 -r1.30.2.5 -r1.30.2.6 --- backend-risx.c 17 Apr 2005 00:09:07 -0000 1.30.2.5 +++ backend-risx.c 31 May 2005 17:57:19 -0000 1.30.2.6 @@ -209,5 +209,5 @@ nhave_buffer_data = 1; - if (print_element_x(item, &buffer, &buffer_len, "title", NULL, NULL, &xindent) == NULL) { + if (print_element_x(item, &buffer, &buffer_len, "title", "type", "full", &xindent) == NULL) { free(buffer); free((char*)item); @@ -314,5 +314,5 @@ if (item != NULL) { - if (print_element_x(item, &buffer, &buffer_len, "title", "type", "gen", &xindent) == NULL) { + if (print_element_x(item, &buffer, &buffer_len, "title", "type", "full", &xindent) == NULL) { free(buffer); free((char*)item); @@ -378,5 +378,5 @@ nhave_buffer_data = 1; - if (print_element_x(item, &buffer, &buffer_len, "title", "type", "gen", &xindent) == NULL) { + if (print_element_x(item, &buffer, &buffer_len, "title", "type", "full", &xindent) == NULL) { free((char*)item); return 801; @@ -1178,6 +1178,49 @@ } - if (print_element_x((reprint.date != NULL) ? reprint.date : "", ptr_buffer, ptr_buffer_len, "reprint", "status", attribute, ptr_indent) == NULL) { - return NULL; + if (!strcmp(attribute, "ONREQUEST") && reprint.date != NULL) { + char year[5]; + char month[3]; + char day[3]; + + strncpy(year, reprint.date, 4); + year[4] = '\0'; + strncpy(month, reprint.date+5, 2); + month[2] = '\0'; + strncpy(day, reprint.date+8, 2); + day[2] = '\0'; + + if (print_elstart_x(ptr_buffer, ptr_buffer_len, "reprint", "status", attribute, NULL, NULL, NULL, NULL, NULL, NULL, 0, ptr_indent) == NULL) { + return NULL; + } + + if (print_elstart_x(ptr_buffer, ptr_buffer_len, "date", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, ptr_indent) == NULL) { + return NULL; + } + + if (print_element_x(year, ptr_buffer, ptr_buffer_len, "year", NULL, NULL, ptr_indent) == NULL) { + return NULL; + } + + if (print_element_x(month, ptr_buffer, ptr_buffer_len, "month", NULL, NULL, ptr_indent) == NULL) { + return NULL; + } + + if (print_element_x(day, ptr_buffer, ptr_buffer_len, "day", NULL, NULL, ptr_indent) == NULL) { + return NULL; + } + + + if (print_elend_x(ptr_buffer, ptr_buffer_len, "date", ptr_indent) == NULL) { + return NULL; + } + + if (print_elend_x(ptr_buffer, ptr_buffer_len, "reprint", ptr_indent) == NULL) { + return NULL; + } + } + else { + if (print_element_x("", ptr_buffer, ptr_buffer_len, "reprint", "status", attribute, ptr_indent) == NULL) { + return NULL; + } } } |
From: Markus H. <mho...@us...> - 2005-05-29 22:33:30
|
Update of /cvsroot/refdb/refdb/dtd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21808/dtd Modified Files: Tag: Release_0_9_5_stable risx.dtd Log Message: made title type attribute required; removed gen value from title attribute Index: risx.dtd =================================================================== RCS file: /cvsroot/refdb/refdb/dtd/risx.dtd,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -u -U2 -r1.12 -r1.12.2.1 --- risx.dtd 4 Nov 2003 23:20:16 -0000 1.12 +++ risx.dtd 29 May 2005 22:33:22 -0000 1.12.2.1 @@ -35,5 +35,5 @@ <!ELEMENT title (#PCDATA)> -<!ATTLIST title type (full|abbrev|user1|user2|gen) "gen"> +<!ATTLIST title type (full|abbrev|user1|user2) #REQUIRED> <!-- the url element is allowed multiple times for future compatibility --> |
From: Markus H. <mho...@us...> - 2005-05-29 22:32:59
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21348 Modified Files: Tag: Release_0_9_5_stable risxhandler.c Log Message: fixed handling of titles Index: risxhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risxhandler.c,v retrieving revision 1.28.2.6 retrieving revision 1.28.2.7 diff -u -U2 -r1.28.2.6 -r1.28.2.7 --- risxhandler.c 5 May 2005 17:21:52 -0000 1.28.2.6 +++ risxhandler.c 29 May 2005 22:32:51 -0000 1.28.2.7 @@ -724,22 +724,39 @@ if (is_descendant_of(ptr_ardata->ptr_first, "part")) { + /* e.g. article, chapter titles */ result = set_risdata_field(ptr_ardata->ptr_risdata, "title", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); } else if (is_descendant_of(ptr_ardata->ptr_first, "publication")) { + /* most important: journal titles and such */ + /* also here: things like book titles */ title_type = get_attr(ptr_ardata->ptr_first, "type"); if (title_type && !strcmp(title_type, "full")) { - if (((ptr_ardata->perinfo).full = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string(ptr_ardata->driver, &((ptr_ardata->perinfo).full)) == -1) { - if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { - (ptr_ardata->nmem_error)++; + /* this may be a full journal title, but also a book title */ + if (!strcmp(ptr_ardata->type, "CHAP") + || !strcmp(ptr_ardata->type, "CASE") + || !strcmp(ptr_ardata->type, "CONF") + || !strcmp(ptr_ardata->type, "BOOK")) { + result = set_risdata_field(ptr_ardata->ptr_risdata, "booktitle", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + } + else if (!strcmp(ptr_ardata->type, "JOUR") + || !strcmp(ptr_ardata->type, "JFULL")) { + if (((ptr_ardata->perinfo).full = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string(ptr_ardata->driver, &((ptr_ardata->perinfo).full)) == -1) { + if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { + (ptr_ardata->nmem_error)++; + return; + } + else { + ptr_ardata->msgpool = new_msgpool; + } + (ptr_ardata->ndb_error)++; return; } - else { - ptr_ardata->msgpool = new_msgpool; - } - (ptr_ardata->ndb_error)++; - return; + } + else { + result = set_risdata_field(ptr_ardata->ptr_risdata, "title", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); } } else if (title_type && !strcmp(title_type, "abbrev")) { + /* abbreviated journal title */ if (((ptr_ardata->perinfo).abbrev = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string(ptr_ardata->driver, &((ptr_ardata->perinfo).abbrev)) == -1) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { @@ -755,4 +772,5 @@ } else if (title_type && !strcmp(title_type, "user1")) { + /* user abbrev1 of a journal title */ if (((ptr_ardata->perinfo).custabbrev1 = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string(ptr_ardata->driver, &((ptr_ardata->perinfo).custabbrev1)) == -1) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { @@ -768,4 +786,5 @@ } else if (title_type && !strcmp(title_type, "user2")) { + /* user abbrev1 of a journal title */ if (((ptr_ardata->perinfo).custabbrev2 = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string(ptr_ardata->driver, &((ptr_ardata->perinfo).custabbrev2)) == -1) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { @@ -780,15 +799,4 @@ } } - else if (!title_type || !*title_type || !strcmp(title_type, "gen")){ - if (!strcmp(ptr_ardata->type, "CHAP") - || !strcmp(ptr_ardata->type, "CASE") - || !strcmp(ptr_ardata->type, "CONF") - || !strcmp(ptr_ardata->type, "BOOK")) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "booktitle", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); - } - else { - result = set_risdata_field(ptr_ardata->ptr_risdata, "title", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); - } - } else { /* this means we've received invalid risx data */ |
From: Markus H. <mho...@us...> - 2005-05-29 19:38:26
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23336 Modified Files: Tag: Release_0_9_5_stable refdbda.c Log Message: connect_to_db(): use auto encoding;move db_encoding to CLIENT_REQUEST Index: refdbda.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbda.c,v retrieving revision 1.41.2.13 retrieving revision 1.41.2.14 diff -u -U2 -r1.41.2.13 -r1.41.2.14 --- refdbda.c 22 May 2005 20:15:34 -0000 1.41.2.13 +++ refdbda.c 29 May 2005 19:38:17 -0000 1.41.2.14 @@ -387,4 +387,5 @@ LOG_PRINT(LOG_DEBUG, ptr_clrequest->dbserver); LOG_PRINT(LOG_DEBUG, ptr_clrequest->db_path); + LOG_PRINT(LOG_DEBUG, ptr_clrequest->db_encoding); conn = dbi_conn_new(ptr_clrequest->dbserver); @@ -404,4 +405,5 @@ special_db overrides ptr_clrequest->current_db */ dbi_conn_set_option(conn, "dbname", my_db); + dbi_conn_set_option(conn, "encoding", "auto"); dbi_conn_set_option_numeric(conn, "port", atoi(ptr_clrequest->dbs_port_address)); @@ -968,10 +970,8 @@ struct CLIENT_REQUEST* ptr_clrequest ptr to structure with client info - const char* dbname ptr to string with the database name - const char* db_encoding name of the character encoding to use ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int createdb(struct CLIENT_REQUEST* ptr_clrequest, const char* db_encoding, struct ADDRESULT* ptr_addresult, int optind) { +int createdb(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult, int optind) { int result; char* new_msg; @@ -988,5 +988,5 @@ /* loop over all filename arguments */ for (; optind < ptr_clrequest->inargc; optind++) { - result = real_createdb(ptr_clrequest, ptr_clrequest->inargv[optind], db_encoding, ptr_addresult); + result = real_createdb(ptr_clrequest, ptr_clrequest->inargv[optind], ptr_addresult); if (result == 1) { ptr_addresult->failure++; @@ -1030,8 +1030,6 @@ const char* dbname ptr to string with the database name - const char* db_encoding name of the character encoding to use - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int real_createdb(struct CLIENT_REQUEST* ptr_clrequest, const char* dbname, const char* db_encoding, struct ADDRESULT* ptr_addresult) { +int real_createdb(struct CLIENT_REQUEST* ptr_clrequest, const char* dbname, struct ADDRESULT* ptr_addresult) { dbi_conn conn = NULL; dbi_result dbires; @@ -1079,6 +1077,6 @@ /* assemble sql command */ if (*encoding_string) { - if (db_encoding && *db_encoding) { - sprintf(sql_command, "CREATE DATABASE %s %s '%s'", dbname, encoding_string, dbi_driver_encoding_from_iana(dbi_conn_get_driver(conn), db_encoding)); + if (ptr_clrequest->db_encoding && *(ptr_clrequest->db_encoding)) { + sprintf(sql_command, "CREATE DATABASE %s %s '%s'", dbname, encoding_string, dbi_driver_encoding_from_iana(dbi_conn_get_driver(conn), ptr_clrequest->db_encoding)); } else { /* use default encoding of db server */ @@ -1087,5 +1085,5 @@ } else { - if (db_encoding && *db_encoding) { + if (ptr_clrequest->db_encoding && *(ptr_clrequest->db_encoding)) { LOG_PRINT(LOG_WARNING, "database engine does not support per-database character encodings, used default encoding instead"); } @@ -1108,5 +1106,5 @@ dbi_result_free(dbires); } - else if (db_encoding && *db_encoding) { /* if sqlite */ + else if (ptr_clrequest->db_encoding && *(ptr_clrequest->db_encoding)) { /* if sqlite */ LOG_PRINT(LOG_WARNING, "database engine does not support per-database character encodings, used default encoding instead"); } /* end if not sqlite */ |
From: Markus H. <mho...@us...> - 2005-05-29 19:35:47
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21740 Modified Files: Tag: Release_0_9_5_stable refdbd.c refdbd.h.in refdbdnote.c refdbdref.c Log Message: move db_encoding to CLIENT_REQUEST Index: refdbd.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbd.c,v retrieving revision 1.74.2.13 retrieving revision 1.74.2.14 diff -u -U2 -r1.74.2.13 -r1.74.2.14 --- refdbd.c 5 May 2005 17:21:25 -0000 1.74.2.13 +++ refdbd.c 29 May 2005 19:35:37 -0000 1.74.2.14 @@ -778,5 +778,5 @@ char cgi_url[_POSIX_PATH_MAX+1] = ""; char set_owner[PREFS_BUF_LEN] = ""; - char db_encoding[PREFS_BUF_LEN] = ""; +/* char db_encoding[PREFS_BUF_LEN] = ""; */ char user_host[HOSTNAME_LENGTH] = ""; char newuser_passwd[PASSWD_LENGTH+1] = ""; @@ -1000,5 +1000,5 @@ *sort_string = '\0'; /* strcpy(db_encoding, default_db_encoding); */ - *db_encoding = '\0'; + *(ptr_child_clrequest->db_encoding) = '\0'; n_privatelist = 0; n_remove = 0; @@ -1023,7 +1023,7 @@ case 'E': /* used for both createdb and getref */ - strncpy(db_encoding, optarg, PREFS_BUF_LEN); - db_encoding[PREFS_BUF_LEN-1] = '\0'; - strup(db_encoding); + strncpy(ptr_child_clrequest->db_encoding, optarg, PREFS_BUF_LEN); + ptr_child_clrequest->db_encoding[PREFS_BUF_LEN-1] = '\0'; + strup(ptr_child_clrequest->db_encoding); break; case 'G': @@ -1352,6 +1352,6 @@ else if (strcmp((ptr_child_clrequest->inargv)[0], "createdb") == 0) { - if (!*db_encoding) { - strcpy(db_encoding, default_db_encoding); + if (!*(ptr_child_clrequest->db_encoding)) { + strcpy(ptr_child_clrequest->db_encoding, default_db_encoding); } @@ -1363,5 +1363,5 @@ } - retval = createdb(ptr_child_clrequest, db_encoding, ptr_addresult, optind); + retval = createdb(ptr_child_clrequest, ptr_addresult, optind); if (retval != 1) { @@ -1424,8 +1424,8 @@ /*********************************************** addref ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "addref") == 0) { - if (!*db_encoding) { - strcpy(db_encoding, default_input_encoding); + if (!*(ptr_child_clrequest->db_encoding)) { + strcpy(ptr_child_clrequest->db_encoding, default_input_encoding); } - retval = addref(ptr_child_clrequest, set_owner, ptr_addresult, 0, n_keep_id, format_string, &id_sentinel, db_encoding); + retval = addref(ptr_child_clrequest, set_owner, ptr_addresult, 0, n_keep_id, format_string, &id_sentinel); /* let the client know what happened */ @@ -1462,8 +1462,8 @@ /*********************************************** updateref ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "updateref") == 0) { - if (!*db_encoding) { - strcpy(db_encoding, default_input_encoding); + if (!*(ptr_child_clrequest->db_encoding)) { + strcpy(ptr_child_clrequest->db_encoding, default_input_encoding); } - retval = addref(ptr_child_clrequest, set_owner, ptr_addresult, n_personal, n_keep_id, format_string, &id_sentinel, db_encoding); + retval = addref(ptr_child_clrequest, set_owner, ptr_addresult, n_personal, n_keep_id, format_string, &id_sentinel); /* let the client know what happened */ @@ -1547,5 +1547,5 @@ /*********************************************** getref ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getref") == 0) { - ptr_biblio_info->encoding = db_encoding; + ptr_biblio_info->encoding = ptr_child_clrequest->db_encoding; retval = getref(ptr_child_clrequest, ptr_biblio_info, ref_format, n_privatelist, pdfroot, cgi_url, ptr_addresult); @@ -1560,8 +1560,5 @@ /*********************************************** addnote ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "addnote") == 0) { - if (!*db_encoding) { - strcpy(db_encoding, default_input_encoding); - } - retval = addnote(ptr_child_clrequest, set_owner, ptr_addresult, 0, &id_sentinel, db_encoding); + retval = addnote(ptr_child_clrequest, set_owner, ptr_addresult, 0, &id_sentinel); /* let the client know what happened */ @@ -1576,8 +1573,5 @@ /*********************************************** updatenote ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "updatenote") == 0) { - if (!*db_encoding) { - strcpy(db_encoding, default_input_encoding); - } - retval = addnote(ptr_child_clrequest, set_owner, ptr_addresult, 1, &id_sentinel, db_encoding); + retval = addnote(ptr_child_clrequest, set_owner, ptr_addresult, 1, &id_sentinel); /* let the client know what happened */ @@ -1612,5 +1606,5 @@ /*********************************************** getnote ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getnote") == 0) { - ptr_biblio_info->encoding = db_encoding; + ptr_biblio_info->encoding = ptr_child_clrequest->db_encoding; retval = getnote(ptr_child_clrequest, ptr_biblio_info, ref_format, n_privatelist, cgi_url, ptr_addresult); @@ -1643,5 +1637,5 @@ /*********************************************** getau *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getau") == 0) { - retval = getfoo(ptr_child_clrequest, GETAU, 0, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETAU, 0, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1655,5 +1649,5 @@ /*********************************************** geted *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "geted") == 0) { - retval = getfoo(ptr_child_clrequest, GETED, 0, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETED, 0, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1667,5 +1661,5 @@ /*********************************************** getas *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getas") == 0) { - retval = getfoo(ptr_child_clrequest, GETAS, 0, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETAS, 0, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1679,5 +1673,5 @@ /*********************************************** getkw *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getkw") == 0) { - retval = getfoo(ptr_child_clrequest, GETKW, 0, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETKW, 0, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1691,5 +1685,5 @@ /*********************************************** getjo *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getjo") == 0) { - retval = getfoo(ptr_child_clrequest, GETJO, n_all, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETJO, n_all, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1703,5 +1697,5 @@ /*********************************************** getjf *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getjf") == 0) { - retval = getfoo(ptr_child_clrequest, GETJF, n_all, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETJF, n_all, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1715,5 +1709,5 @@ /*********************************************** getj1 *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getj1") == 0) { - retval = getfoo(ptr_child_clrequest, GETJ1, n_all, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETJ1, n_all, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1727,5 +1721,5 @@ /*********************************************** getj2 *****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getj2") == 0) { - retval = getfoo(ptr_child_clrequest, GETJ2, n_all, db_encoding, ptr_addresult); + retval = getfoo(ptr_child_clrequest, GETJ2, n_all, ptr_child_clrequest->db_encoding, ptr_addresult); if (retval != 1) { n_client_status = read_status(ptr_child_clrequest->fd); @@ -1775,5 +1769,5 @@ /*********************************************** getbib ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "getbib") == 0) { - ptr_biblio_info->encoding = db_encoding; + ptr_biblio_info->encoding = ptr_child_clrequest->db_encoding; retval = getbib(ptr_child_clrequest, ptr_biblio_info, ref_format, n_send_stylespec, ptr_addresult); @@ -1804,5 +1798,5 @@ /*********************************************** gettexbib ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "gettexbib") == 0) { - ptr_biblio_info->encoding = db_encoding; + ptr_biblio_info->encoding = ptr_child_clrequest->db_encoding; retval = gettexbib(ptr_child_clrequest, ptr_biblio_info, ptr_addresult); Index: refdbd.h.in =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbd.h.in,v retrieving revision 1.7.2.7 retrieving revision 1.7.2.8 diff -u -U2 -r1.7.2.7 -r1.7.2.8 --- refdbd.h.in 17 Apr 2005 00:05:04 -0000 1.7.2.7 +++ refdbd.h.in 29 May 2005 19:35:37 -0000 1.7.2.8 @@ -52,4 +52,5 @@ char current_db[DBNAME_LENGTH+1]; /* name of reference database */ char db_path[PREFS_BUF_LEN]; /* path of dir containing databases */ + char db_encoding[PREFS_BUF_LEN]; /* input or output encoding */ char client_ip[16]; /* IP address of client */ char* argument; /* additional unparsed command arguments */ @@ -105,10 +106,10 @@ int getstyle(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult); int whichdb(struct CLIENT_REQUEST* ptr_clrequest); -int createdb(struct CLIENT_REQUEST* ptr_clrequest, const char* db_encoding, struct ADDRESULT* ptr_addresult, int optind); -int real_createdb(struct CLIENT_REQUEST* ptr_clrequest, const char* dbname, const char* db_encoding, struct ADDRESULT* ptr_addresult); +int createdb(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult, int optind); +int real_createdb(struct CLIENT_REQUEST* ptr_clrequest, const char* db_encoding, struct ADDRESULT* ptr_addresult); int deletedb(struct CLIENT_REQUEST* ptr_clrequest, int optind, struct ADDRESULT* ptr_addresult); int child_confserv(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult); void confserv(char *command, char *server_ip); -int addref(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_ref, int n_keep_id, const char* reftype, Lilid* ptr_sentinel, char* input_encoding); +int addref(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_ref, int n_keep_id, const char* reftype, Lilid* ptr_sentinel); int deleteref(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult); int delete_ref_by_id(unsigned long long idval, dbi_conn conn, struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult); @@ -127,5 +128,5 @@ int is_refdb_admin(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult); int run_keyword_scan(struct CLIENT_REQUEST* ptr_clrequest, Lilid* ptr_sentinel, int mode); -int addnote(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_note, Lilid* ptr_sentinel, char* input_encoding); +int addnote(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_note, Lilid* ptr_sentinel); int deletenote(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult); int getnote(struct CLIENT_REQUEST* ptr_clrequest, struct bibinfo *ptr_biblio_info, int ref_format, int n_privatelist, char *cgi_url, struct ADDRESULT* ptr_addresult); Index: refdbdnote.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdnote.c,v retrieving revision 1.25.2.5 retrieving revision 1.25.2.6 diff -u -U2 -r1.25.2.5 -r1.25.2.6 --- refdbdnote.c 5 May 2005 17:30:22 -0000 1.25.2.5 +++ refdbdnote.c 29 May 2005 19:35:37 -0000 1.25.2.6 @@ -76,8 +76,6 @@ added ID values - char* input_encoding encoding of the input data - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int addnote(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_note, Lilid* ptr_sentinel, char* input_encoding) { +int addnote(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_note, Lilid* ptr_sentinel) { dbi_conn conn; dbi_conn conn_refdb = NULL; Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.9 retrieving revision 1.65.2.10 diff -u -U2 -r1.65.2.9 -r1.65.2.10 --- refdbdref.c 5 May 2005 17:28:37 -0000 1.65.2.9 +++ refdbdref.c 29 May 2005 19:35:37 -0000 1.65.2.10 @@ -289,8 +289,6 @@ added ID values - char* input_encoding encoding of the input data - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int addref(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_ref, int n_keep_id, const char* reftype, Lilid* ptr_sentinel, char* input_encoding) { +int addref(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int replace_ref, int n_keep_id, const char* reftype, Lilid* ptr_sentinel) { dbi_conn conn; dbi_conn conn_refdb = NULL; @@ -344,10 +342,10 @@ /* if we need to convert, create a conversion descriptor for iconv() */ - if (db_encoding && strcmp(db_encoding, !strcmp(reftype, "risx") ? "UTF-8" : input_encoding)) { - ardata.conv_descriptor = iconv_open(!strcmp(db_encoding, "US-ASCII") ? "ASCII" : db_encoding, !strcmp(reftype, "risx") ? "UTF-8" : input_encoding); + if (db_encoding && strcmp(db_encoding, !strcmp(reftype, "risx") ? "UTF-8" : ptr_clrequest->db_encoding)) { + ardata.conv_descriptor = iconv_open(!strcmp(db_encoding, "US-ASCII") ? "ASCII" : db_encoding, !strcmp(reftype, "risx") ? "UTF-8" : ptr_clrequest->db_encoding); if (ardata.conv_descriptor == (iconv_t)(-1)) { ardata.conv_descriptor = NULL; LOG_PRINT(LOG_WARNING, "cannot set conversion descriptor (input/database):"); - LOG_PRINT(LOG_DEBUG, input_encoding); + LOG_PRINT(LOG_DEBUG, ptr_clrequest->db_encoding); LOG_PRINT(LOG_DEBUG, db_encoding); iconv_init_status = 701; @@ -355,5 +353,5 @@ else { LOG_PRINT(LOG_DEBUG, "input encoding is:"); - LOG_PRINT(LOG_DEBUG, input_encoding); + LOG_PRINT(LOG_DEBUG, ptr_clrequest->db_encoding); } } |
From: Markus H. <mho...@us...> - 2005-05-29 16:55:19
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv469 Modified Files: Tag: Release_0_9_5_stable risdata.c Log Message: add empty otherinfo string if none is present Index: risdata.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risdata.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -U2 -r1.5.2.1 -r1.5.2.2 --- risdata.c 13 Jul 2004 20:30:21 -0000 1.5.2.1 +++ risdata.c 29 May 2005 16:55:11 -0000 1.5.2.2 @@ -354,9 +354,10 @@ if (!otherinfo || !*otherinfo) { - /* we're done */ - return 0; + escape_buffer = strdup("///"); + } + else { + escape_buffer = strdup(otherinfo); } - escape_buffer = strdup(otherinfo); if (escape_buffer == NULL) { LOG_PRINT(LOG_WARNING, "malloc failed"); |
From: Markus H. <mho...@us...> - 2005-05-29 16:54:30
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32517 Modified Files: Tag: Release_0_9_5_stable backend-ris.c Log Message: fixed date output for missing year and for missing otherinfo Index: backend-ris.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-ris.c,v retrieving revision 1.14.2.3 retrieving revision 1.14.2.4 diff -u -U2 -r1.14.2.3 -r1.14.2.4 --- backend-ris.c 28 May 2005 20:08:55 -0000 1.14.2.3 +++ backend-ris.c 29 May 2005 16:54:21 -0000 1.14.2.4 @@ -490,5 +490,5 @@ /* pubyear - other information */ if ((item = get_refdb_pyother_info(ptr_rendinfo->dbires)) != NULL && *item) { - if (!have_pubyear) { + if (!have_pubyear && strcmp(item, "///")) { if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "\nPY - ", ptr_rendinfo->ptr_ref_len, 0)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -499,13 +499,15 @@ } } - if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), (char*)item, ptr_rendinfo->ptr_ref_len, 0)) == NULL) { - LOG_PRINT(LOG_WARNING, outomem.text); - return 801; - } - else { - *(ptr_rendinfo->ptr_ref) = new_ref; + if (have_pubyear || strcmp(item, "///")) { + if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), (char*)item, ptr_rendinfo->ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + return 801; + } + else { + *(ptr_rendinfo->ptr_ref) = new_ref; + } } } - else { + else if (have_pubyear) { /* add /// to make the date entry valid */ if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "///", ptr_rendinfo->ptr_ref_len, 0)) == NULL) { @@ -532,5 +534,5 @@ /* secyear - other information */ if ((item = get_refdb_secother_info(ptr_rendinfo->dbires)) != NULL && *item) { - if (!have_pubyear) { + if (!have_pubyear && strcmp(item, "///")) { if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "\nY2 - ", ptr_rendinfo->ptr_ref_len, 0)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -541,13 +543,15 @@ } } - if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), (char*)item, ptr_rendinfo->ptr_ref_len, 0)) == NULL) { - LOG_PRINT(LOG_WARNING, outomem.text); - return 801; - } - else { - *(ptr_rendinfo->ptr_ref) = new_ref; + if (have_pubyear || strcmp(item, "///")) { + if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), (char*)item, ptr_rendinfo->ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + return 801; + } + else { + *(ptr_rendinfo->ptr_ref) = new_ref; + } } } - else { + else if (have_pubyear) { /* add /// to make the date entry valid */ if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "///", ptr_rendinfo->ptr_ref_len, 0)) == NULL) { |
From: Markus H. <mho...@us...> - 2005-05-28 20:13:18
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9730/src Modified Files: Tag: Release_0_9_5_stable dbfncs.c dbfncs.h Log Message: fixed longlong vs short mismatch in my_dbi_result_get_idval_idx() Index: dbfncs.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/dbfncs.c,v retrieving revision 1.15.2.9 retrieving revision 1.15.2.10 diff -u -U2 -r1.15.2.9 -r1.15.2.10 --- dbfncs.c 14 May 2005 20:50:22 -0000 1.15.2.9 +++ dbfncs.c 28 May 2005 20:13:09 -0000 1.15.2.10 @@ -2152,5 +2152,5 @@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -unsigned long long my_dbi_result_get_idval_idx(dbi_result dbires, unsigned long long idx) { +unsigned long long my_dbi_result_get_idval_idx(dbi_result dbires, unsigned short idx) { dbi_conn conn; Index: dbfncs.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/dbfncs.h,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -u -U2 -r1.6.2.2 -r1.6.2.3 --- dbfncs.h 5 May 2005 17:21:25 -0000 1.6.2.2 +++ dbfncs.h 28 May 2005 20:13:09 -0000 1.6.2.3 @@ -58,5 +58,5 @@ const char* my_dbi_driver_get_cap(dbi_driver driver, const char* cap); unsigned long long my_dbi_result_get_idval(dbi_result dbires, const char* fieldname); -unsigned long long my_dbi_result_get_idval_idx(dbi_result dbires, unsigned long long idx); +unsigned long long my_dbi_result_get_idval_idx(dbi_result dbires, unsigned short idx); int my_dbi_conn_get_versioninfo(dbi_conn conn, struct VERSIONINFO* ptr_ver); |
From: Markus H. <mho...@us...> - 2005-05-28 20:11:42
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8839/src Modified Files: Tag: Release_0_9_5_stable backendn-html.c Log Message: fixed return value Index: backendn-html.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backendn-html.c,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -u -U2 -r1.6.2.2 -r1.6.2.3 --- backendn-html.c 17 Apr 2005 00:09:09 -0000 1.6.2.2 +++ backendn-html.c 28 May 2005 20:11:33 -0000 1.6.2.3 @@ -327,5 +327,5 @@ free(item); LOG_PRINT(LOG_CRIT, get_status_msg(801)); - return NULL; + return 801; } else { |
From: Markus H. <mho...@us...> - 2005-05-28 20:10:37
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8101/src Modified Files: Tag: Release_0_9_5_stable backend.h Log Message: added get_refdb_note_date() prototype Index: backend.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.h,v retrieving revision 1.23.2.1 retrieving revision 1.23.2.2 diff -u -U2 -r1.23.2.1 -r1.23.2.2 --- backend.h 15 Apr 2005 22:45:06 -0000 1.23.2.1 +++ backend.h 28 May 2005 20:10:20 -0000 1.23.2.2 @@ -94,4 +94,5 @@ char* get_refdb_note_id(dbi_result dbires, char* id); const char* get_refdb_note_key(dbi_result dbires); +char* get_refdb_note_date(dbi_result dbires, char* date, int mode); const char* get_refdb_note_user_name(dbi_result dbires); char* get_refdb_note_title_copy(dbi_result dbires); |
From: Markus H. <mho...@us...> - 2005-05-28 20:09:03
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7277/src Modified Files: Tag: Release_0_9_5_stable backend-ris.c Log Message: add missing slashes in date output Index: backend-ris.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-ris.c,v retrieving revision 1.14.2.2 retrieving revision 1.14.2.3 diff -u -U2 -r1.14.2.2 -r1.14.2.3 --- backend-ris.c 17 Apr 2005 00:09:07 -0000 1.14.2.2 +++ backend-ris.c 28 May 2005 20:08:55 -0000 1.14.2.3 @@ -507,4 +507,14 @@ } } + else { + /* add /// to make the date entry valid */ + if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "///", ptr_rendinfo->ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + return 801; + } + else { + *(ptr_rendinfo->ptr_ref) = new_ref; + } + } /*----------------------------------------------------------------*/ @@ -539,4 +549,14 @@ } } + else { + /* add /// to make the date entry valid */ + if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "///", ptr_rendinfo->ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + return 801; + } + else { + *(ptr_rendinfo->ptr_ref) = new_ref; + } + } /*----------------------------------------------------------------*/ |