refdb-cvs Mailing List for RefDB (Page 64)
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...> - 2004-08-11 20:59:24
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18420 Modified Files: Tag: Release_0_9_5_stable backend-dbib.c Log Message: fixed corrupt output if BIBLIOTITLE is empty Index: backend-dbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.c,v retrieving revision 1.28.2.1 retrieving revision 1.28.2.2 diff -u -U2 -r1.28.2.1 -r1.28.2.2 --- backend-dbib.c 13 Jul 2004 20:29:08 -0000 1.28.2.1 +++ backend-dbib.c 11 Aug 2004 20:59:15 -0000 1.28.2.2 @@ -97,4 +97,12 @@ } + /* get the database encoding */ + if (!*(ptr_biblio_info->encoding)) { + db_encoding = dbi_conn_get_encoding(conn); + } + else { + db_encoding = (const char*)ptr_biblio_info->encoding; + } + if (!strcmp(my_dbi_conn_get_cap(conn, "multiple_db"), "t")) { sprintf(sql_command, "SELECT BIBLIOTITLE from %s.CITSTYLE where JOURNAL=%s", MAIN_DB, myjournal); @@ -128,15 +136,4 @@ } - /* todo: set encoding appropriately */ - - /* get the database encoding */ - if (!*(ptr_biblio_info->encoding)) { - db_encoding = dbi_conn_get_encoding(conn); - } - else { - db_encoding = (const char*)ptr_biblio_info->encoding; - } - - /* the bibliography must not have a doctype line if it is included as an external entity */ |
From: Markus H. <mho...@us...> - 2004-08-05 05:42:18
|
Update of /cvsroot/refdb/refdb/xsl/refdb/docbk-refdb-xsl/docbk-html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8511/xsl/refdb/docbk-refdb-xsl/docbk-html Modified Files: Tag: Release_0_9_5_stable docbk-refdb-html.xsl.in Log Message: fixed template refdb-process-inline Index: docbk-refdb-html.xsl.in =================================================================== RCS file: /cvsroot/refdb/refdb/xsl/refdb/docbk-refdb-xsl/docbk-html/docbk-refdb-html.xsl.in,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -U2 -r1.11 -r1.11.2.1 --- docbk-refdb-html.xsl.in 2 May 2004 00:09:43 -0000 1.11 +++ docbk-refdb-html.xsl.in 4 Aug 2004 20:54:26 -0000 1.11.2.1 @@ -409,35 +409,36 @@ <xsl:template name="refdb-process-inline"> <xsl:param name="style"></xsl:param> - <xsl:if test="$style='ULINE' or $style='ITULINE' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"><u></xsl:text> - </xsl:if> - <xsl:if test="$style='ITALIC' or $style='ITULINE' or $style='BOLDITALIC' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"><i></xsl:text> - </xsl:if> - <xsl:if test="$style='BOLD' or $style='BOLDITALIC' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"><b></xsl:text> - </xsl:if> - <xsl:if test="$style='SUB'"> - <xsl:text disable-output-escaping="yes"><sub></xsl:text> - </xsl:if> - <xsl:if test="$style='SUPER'"> - <xsl:text disable-output-escaping="yes"><sup></xsl:text> - </xsl:if> - <xsl:apply-templates mode="refdb"/> - <xsl:if test="$style='SUPER'"> - <xsl:text disable-output-escaping="yes"></sup></xsl:text> - </xsl:if> - <xsl:if test="$style='SUB'"> - <xsl:text disable-output-escaping="yes"></sub></xsl:text> - </xsl:if> - <xsl:if test="$style='BOLD' or $style='BOLDITALIC' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"></b></xsl:text> - </xsl:if> - <xsl:if test="$style='ITALIC' or $style='ITULINE' or $style='BOLDITALIC' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"></i></xsl:text> - </xsl:if> - <xsl:if test="$style='ULINE' or $style='ITULINE' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"></u></xsl:text> - </xsl:if> + <xsl:choose> + <xsl:when test="$style='ULINE'"> + <u><xsl:apply-templates mode="refdb"/></u> + </xsl:when> + <xsl:when test="$style='ITULINE'"> + <i><u><xsl:apply-templates mode="refdb"/></u></i> + </xsl:when> + <xsl:when test="$style='BOLDULINE'"> + <b><u><xsl:apply-templates mode="refdb"/></u></b> + </xsl:when> + <xsl:when test="$style='BOLDITULINE'"> + <b><i><u><xsl:apply-templates mode="refdb"/></u></i></b> + </xsl:when> + <xsl:when test="$style='ITALIC'"> + <i><xsl:apply-templates mode="refdb"/></i> + </xsl:when> + <xsl:when test="$style='BOLDITALIC'"> + <b><i><xsl:apply-templates mode="refdb"/></i></b> + </xsl:when> + <xsl:when test="$style='BOLD'"> + <b><xsl:apply-templates mode="refdb"/></b> + </xsl:when> + <xsl:when test="$style='SUB'"> + <sub><xsl:apply-templates mode="refdb"/></sub> + </xsl:when> + <xsl:when test="$style='SUPER'"> + <sup><xsl:apply-templates mode="refdb"/></sup> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="refdb"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> |
From: Markus H. <mho...@us...> - 2004-08-05 02:18:44
|
Update of /cvsroot/refdb/refdb/xsl/refdb/docbk-refdb-xsl/docbk-xhtml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8511/xsl/refdb/docbk-refdb-xsl/docbk-xhtml Modified Files: Tag: Release_0_9_5_stable docbk-refdb-xhtml.xsl.in Log Message: fixed template refdb-process-inline Index: docbk-refdb-xhtml.xsl.in =================================================================== RCS file: /cvsroot/refdb/refdb/xsl/refdb/docbk-refdb-xsl/docbk-xhtml/docbk-refdb-xhtml.xsl.in,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -U2 -r1.8 -r1.8.2.1 --- docbk-refdb-xhtml.xsl.in 2 May 2004 00:09:43 -0000 1.8 +++ docbk-refdb-xhtml.xsl.in 4 Aug 2004 20:54:28 -0000 1.8.2.1 @@ -420,35 +420,36 @@ <xsl:template name="refdb-process-inline"> <xsl:param name="style"></xsl:param> - <xsl:if test="$style='ULINE' or $style='ITULINE' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"><u></xsl:text> - </xsl:if> - <xsl:if test="$style='ITALIC' or $style='ITULINE' or $style='BOLDITALIC' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"><i></xsl:text> - </xsl:if> - <xsl:if test="$style='BOLD' or $style='BOLDITALIC' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"><b></xsl:text> - </xsl:if> - <xsl:if test="$style='SUB'"> - <xsl:text disable-output-escaping="yes"><sub></xsl:text> - </xsl:if> - <xsl:if test="$style='SUPER'"> - <xsl:text disable-output-escaping="yes"><sup></xsl:text> - </xsl:if> - <xsl:apply-templates mode="refdb"/> - <xsl:if test="$style='SUPER'"> - <xsl:text disable-output-escaping="yes"></sup></xsl:text> - </xsl:if> - <xsl:if test="$style='SUB'"> - <xsl:text disable-output-escaping="yes"></sub></xsl:text> - </xsl:if> - <xsl:if test="$style='BOLD' or $style='BOLDITALIC' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"></b></xsl:text> - </xsl:if> - <xsl:if test="$style='ITALIC' or $style='ITULINE' or $style='BOLDITALIC' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"></i></xsl:text> - </xsl:if> - <xsl:if test="$style='ULINE' or $style='ITULINE' or $style='BOLDULINE' or $style='BOLDITULINE'"> - <xsl:text disable-output-escaping="yes"></u></xsl:text> - </xsl:if> + <xsl:choose> + <xsl:when test="$style='ULINE'"> + <u><xsl:apply-templates mode="refdb"/></u> + </xsl:when> + <xsl:when test="$style='ITULINE'"> + <i><u><xsl:apply-templates mode="refdb"/></u></i> + </xsl:when> + <xsl:when test="$style='BOLDULINE'"> + <b><u><xsl:apply-templates mode="refdb"/></u></b> + </xsl:when> + <xsl:when test="$style='BOLDITULINE'"> + <b><i><u><xsl:apply-templates mode="refdb"/></u></i></b> + </xsl:when> + <xsl:when test="$style='ITALIC'"> + <i><xsl:apply-templates mode="refdb"/></i> + </xsl:when> + <xsl:when test="$style='BOLDITALIC'"> + <b><i><xsl:apply-templates mode="refdb"/></i></b> + </xsl:when> + <xsl:when test="$style='BOLD'"> + <b><xsl:apply-templates mode="refdb"/></b> + </xsl:when> + <xsl:when test="$style='SUB'"> + <sub><xsl:apply-templates mode="refdb"/></sub> + </xsl:when> + <xsl:when test="$style='SUPER'"> + <sup><xsl:apply-templates mode="refdb"/></sup> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="refdb"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> |
From: Markus H. <mho...@us...> - 2004-08-04 20:57:31
|
Update of /cvsroot/refdb/refdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9121 Modified Files: Tag: Release_0_9_5_stable configure.in Log Message: bumped up version number Index: configure.in =================================================================== RCS file: /cvsroot/refdb/refdb/configure.in,v retrieving revision 1.49.2.2 retrieving revision 1.49.2.3 diff -u -U2 -r1.49.2.2 -r1.49.2.3 --- configure.in 15 Jun 2004 22:49:04 -0000 1.49.2.2 +++ configure.in 4 Aug 2004 20:57:11 -0000 1.49.2.3 @@ -6,5 +6,5 @@ dnl Use automake -AM_INIT_AUTOMAKE(refdb, 0.9.5-pre3) +AM_INIT_AUTOMAKE(refdb, 0.9.5-pre4) dnl Find out host type |
From: Markus H. <mho...@us...> - 2004-07-30 21:35:04
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32135 Modified Files: Tag: Release_0_9_5_stable refdbdref.c Log Message: getref():support TA pseudo target Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.2 retrieving revision 1.65.2.3 diff -u -U2 -r1.65.2.2 -r1.65.2.3 --- refdbdref.c 24 Jun 2004 21:10:07 -0000 1.65.2.2 +++ refdbdref.c 30 Jul 2004 21:34:54 -0000 1.65.2.3 @@ -3044,4 +3044,117 @@ /*----------------------------------------------------------------*/ + /* search in all titles */ + else if (strncmp(token, ":TA:", 4) == 0) { /* all titles query */ + char table[3][27] = {"t_refdb.refdb_title", + "t_refdb.refdb_booktitle", + "t_refdb.refdb_title_series"}; + char the_op[6]; + int i; + int n_isfirst = 1; + + /* todo: fixme */ + strncpy(operator, &token[4], sqltoken.length-4); /* save the comparison operator */ + operator[sqltoken.length-4] = '\0'; /* terminate string */ + + if (*operator == '=') { + strcpy(bitsandpieces, " = "); + strcpy(the_op, " OR "); + } + else if (*operator == '~') { + sprintf(bitsandpieces, " %s ", my_dbi_conn_get_cap(conn, "rlike")); + strcpy(the_op, " OR "); + } + else if (*operator == '!' && *(operator+1) == '=') { + sprintf(bitsandpieces, " != "); + strcpy(the_op, " AND "); + } + else { /* treat all other operators as non-equal */ + sprintf(bitsandpieces, " %s ", my_dbi_conn_get_cap(conn, "not_rlike")); + strcpy(the_op, " AND "); + } + + token = sql_tokenize(newtoken, &sqltoken); + newtoken = sqltoken.next_token; + if (token != NULL) { +/* printf("%s:%d\n", token, error); */ +/* printf("%s\n", newtoken); */ + if ((new_buffer = mstrncpy(buffer, token, sqltoken.length, &buffer_len)) == NULL) { + error = 1; + break; + } + else { + buffer = new_buffer; + } + buffer[sqltoken.length] ='\0'; + quoted_token = mstrdup(buffer); + if (!quoted_token) { + error = 1; + break; + } + if (dbi_driver_quote_string(driver, "ed_token) == -1) { + error = 1; + break; + } + + for (i = 0; i<3; i++) { + if (!n_isfirst) { + if ((new_sql_command1 = mstrcat(sql_command1, the_op, &sql_command1_len, 0)) == NULL) { + error = 1; + break; + } + else { + sql_command1 = new_sql_command1; + } + } + else { + n_isfirst--; + if ((new_sql_command1 = mstrcat(sql_command1, "(", &sql_command1_len, 0)) == NULL) { + error = 1; + break; + } + else { + sql_command1 = new_sql_command1; + } + } + + if ((new_sql_command1 = mstrcat(sql_command1, table[i], &sql_command1_len, 0)) == NULL) { + error = 1; + break; + } + else { + sql_command1 = new_sql_command1; + } + + if ((new_sql_command1 = mstrcat(sql_command1, bitsandpieces, &sql_command1_len, 0)) == NULL) { + error = 1; + break; + } + else { + sql_command1 = new_sql_command1; + } + + if ((new_sql_command1 = mstrcat(sql_command1, quoted_token, &sql_command1_len, 0)) == NULL) { + error = 1; + free(quoted_token); + break; + } + else { + sql_command1 = new_sql_command1; + } + } /* end for */ + + if ((new_sql_command1 = mstrcat(sql_command1, ")", &sql_command1_len, 0)) == NULL) { + error = 1; + break; + } + else { + sql_command1 = new_sql_command1; + } + + free(quoted_token); + } + } + + /*----------------------------------------------------------------*/ /* extended notes - note ID */ else if (strncmp(token, ":NID:", 5) == 0) { /* extended note ID query */ |
From: Markus H. <mho...@us...> - 2004-07-29 20:55:17
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25810/src Modified Files: Tag: Release_0_9_5_stable xmlhandler.c Log Message: reverted part of the get_ancestor_attr() to get_attr() changes of the previous patch as they were dead wrong Index: xmlhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.c,v retrieving revision 1.22.2.4 retrieving revision 1.22.2.5 diff -u -U2 -r1.22.2.4 -r1.22.2.5 --- xmlhandler.c 26 Jul 2004 20:39:56 -0000 1.22.2.4 +++ xmlhandler.c 29 Jul 2004 20:55:01 -0000 1.22.2.5 @@ -575,5 +575,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { - strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); + strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -602,5 +602,5 @@ strcpy(table_name, "REFSTYLE"); strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); + strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); n_chardata = 1; n_attrdata = 1; @@ -663,5 +663,5 @@ strcpy(table_name, "REFSTYLE"); strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); + strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -699,5 +699,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); + strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -724,5 +724,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); + strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -768,5 +768,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); + strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { |
From: Markus H. <mho...@us...> - 2004-07-29 20:52:45
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25279/src Modified Files: Tag: Release_0_9_5_stable backend-dbiba.c Log Message: fixed bracketing error in pagerange formatting;arabic_to_roman():fixed uninitialized roman variable;make FULL the default if no style attribute is given Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.6 retrieving revision 1.26.2.7 diff -u -U2 -r1.26.2.6 -r1.26.2.7 --- backend-dbiba.c 23 Jul 2004 01:59:29 -0000 1.26.2.6 +++ backend-dbiba.c 29 Jul 2004 20:52:36 -0000 1.26.2.7 @@ -2240,5 +2240,6 @@ /* if we only have the start page or the format says to only use the start page, forget about the end page */ item_type = dbi_result_get_string_idx(dbires_ref, PAGESPAGERANGETYPE); - if (!item_ep || !*item_ep || (item_type && strcmp(item_type, "STARTONLY")) == 0) { + if (!item_ep || !*item_ep || (item_type && strcmp(item_type, "STARTONLY") == 0)) { + item = my_dbi_result_get_string_copy_idx(dbires_ref, PAGESSINGLEPAGEPRECEEDING); if (item && *item && !dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { @@ -2723,5 +2724,5 @@ static char* format_year(char* ref, size_t* ptr_ref_len, unsigned short n_year, const char* yearformat, const char* pad, const char* unique_suffix) { char* new_ref; - char the_year[32]; + char the_year[32] = ""; char year_string[32]; @@ -3065,4 +3066,7 @@ }; + /* start with a clean string */ + *roman = '\0'; + /* give up if the number cannot be nicely formatted */ if (atoi(arabic) >= 4000) { @@ -3229,5 +3233,5 @@ if (!(*endpage_leading_slack || *startpage_leading_slack)) { /* this format uses the minimum number of digits necessary to unambiguously denote the endpage */ - if (strcmp(format, "ABBREV") == 0) { + if (format && strcmp(format, "ABBREV") == 0) { strcpy(my_endpage, new_endpage); ptr_start = my_startpage; @@ -3246,5 +3250,5 @@ /* this format uses one (1-9) or two digits (> 10) or at least two digits (> 100) to render the endpage */ - else if (strcmp(format, "TWODIGIT") == 0) { + else if (format && strcmp(format, "TWODIGIT") == 0) { if (strlen(new_endpage) > 2) { strcpy(my_endpage, new_endpage); @@ -3268,9 +3272,9 @@ /* ToDo: this format appears odd to me and needs some more research to find out about the rules. A brief web search made me feel it is best to use full citation style here. Only Reference Manager claims that Chicago style is different from full, but the examples given are inconsistent. */ - /* else if (strcmp(format, "CHICAGO") == 0) { */ + /* else if (format && strcmp(format, "CHICAGO") == 0) { */ /* } */ /* full means the endpage is rendered with at least as many digits as the startpage, nothing gets abbreviated. Nothing to do, expanded endpage is still in new_endpage */ - /* if (strcmp(format, "FULL") == 0) { */ + /* if (format && strcmp(format, "FULL") == 0) { */ /* } */ } |
From: Markus H. <mho...@us...> - 2004-07-29 20:47:35
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24195/scripts Modified Files: Tag: Release_0_9_5_stable libgen.pl Log Message: fixed missing title formatting Index: libgen.pl =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/libgen.pl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -U2 -r1.5 -r1.5.2.1 --- libgen.pl 29 Mar 2004 21:42:59 -0000 1.5 +++ libgen.pl 29 Jul 2004 20:47:23 -0000 1.5.2.1 @@ -221,5 +221,5 @@ print "<!-- chapter title in bibliography -->\n\n"; - print "<xsl:template match=\"bibliomset[\@relation=\'chapter\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibliomixed/\@role\"/>\n <xsl:choose>\n"; + print "<xsl:template match=\"bibliomset[\@relation=\'chapter\' or \@relation=\'article\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibliomixed/\@role\"/>\n <xsl:choose>\n"; foreach $type (@types) { @@ -233,5 +233,23 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"bibliomset[\@relation=\'chapter\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"bibliomset[\@relation=\'chapter\' or \@relation=\'article\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + } + + # series title in bibliography + print "<!-- series title in bibliography -->\n\n"; + + print "<xsl:template match=\"bibliomset[\@relation=\'series\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibliomixed/\@role\"/>\n <xsl:choose>\n"; + + foreach $type (@types) { + print " <xsl:when test=\"\$reftype=\'$type\'\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n </xsl:when>\n"; + } + + print " </xsl:choose>\n</xsl:template>\n\n"; + + # series title in intext citation + print "<!-- series title in intext citation -->\n\n"; + + foreach $type (@intext_types) { + print "<xsl:template match=\"bibliomset[\@relation=\'series\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } @@ -400,5 +418,5 @@ print "<!-- journal title in bibliography -->\n\n"; - print "<xsl:template match=\"seg[\@type=\'JOURNAL\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + print "<xsl:template match=\"seg[\@type=\'journal\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; foreach $type (@types) { @@ -412,5 +430,5 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"seg[\@type=\'JOURNAL\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "JOURNALNAMESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"seg[\@type=\'journal\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "JOURNALNAMESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } @@ -418,5 +436,5 @@ print "<!-- book title in bibliography -->\n\n"; - print "<xsl:template match=\"seg[\@type=\'BOOK\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + print "<xsl:template match=\"seg[\@type=\'book\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; foreach $type (@types) { @@ -430,5 +448,5 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"seg[\@type=\'BOOK\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "BOOKTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"seg[\@type=\'book\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "BOOKTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } @@ -436,5 +454,5 @@ print "<!-- chapter title in bibliography -->\n\n"; - print "<xsl:template match=\"seg[\@type=\'CHAPTER\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + print "<xsl:template match=\"seg[\@type=\'chapter\' or \@type=\'article\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; foreach $type (@types) { @@ -448,5 +466,23 @@ foreach $type (@intext_types) { - print "<xsl:template match=\"seg[\@type=\'CHAPTER\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + print "<xsl:template match=\"seg[\@type=\'chapter\' or \@type=\'article\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "TITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + } + + # series title in bibliography + print "<!-- series title in bibliography -->\n\n"; + + print "<xsl:template match=\"seg[\@type=\'series\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + + foreach $type (@types) { + print " <xsl:when test=\"\$reftype=\'$type\'\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n </xsl:when>\n"; + } + + print " </xsl:choose>\n</xsl:template>\n\n"; + + # series title in intext citation + print "<!-- series title in intext citation -->\n\n"; + + foreach $type (@intext_types) { + print "<xsl:template match=\"seg[\@type=\'series\']/title\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "SERIESTITLESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; } |
From: Markus H. <mho...@us...> - 2004-07-26 20:41:33
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27419 Modified Files: Tag: Release_0_9_5_stable xmlhandler.h Log Message: new member ptr_ndb_notfound in struct getbib_data Index: xmlhandler.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -U2 -r1.6 -r1.6.2.1 --- xmlhandler.h 9 Nov 2003 00:56:30 -0000 1.6 +++ xmlhandler.h 26 Jul 2004 20:41:23 -0000 1.6.2.1 @@ -59,4 +59,5 @@ int* ptr_nmem_error; /* if != 0, out of memory error occurred */ int* ptr_ndb_error; /* if != 0, database error occurred */ + unsigned long long* ptr_ndb_notfound; /* number of refs not found in the database */ struct simple_elstack *ptr_sfirst; struct CLIENT_REQUEST *ptr_clrequest; |
From: Markus H. <mho...@us...> - 2004-07-26 20:40:12
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27137 Modified Files: Tag: Release_0_9_5_stable xmlhandler.c Log Message: simplified some get_ancestor_attr() to get_attr() calls; fixed segfault if PUBTYPE TYPE is not set;increment ref not found counter Index: xmlhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.c,v retrieving revision 1.22.2.3 retrieving revision 1.22.2.4 diff -u -U2 -r1.22.2.3 -r1.22.2.4 --- xmlhandler.c 23 Jul 2004 02:03:56 -0000 1.22.2.3 +++ xmlhandler.c 26 Jul 2004 20:39:56 -0000 1.22.2.4 @@ -124,5 +124,7 @@ if (strcmp(el, "PUBTYPE") == 0) { /* create new entry in database. PUBTYPE has only one attribute TYPE, the value of which is therefore in attr[1], if at all */ - if (ptr_attr[1] && *(ptr_attr[1])) { + /* NB ptr_attr == NULL is not permitted by the DTD but + we better check */ + if (ptr_attr && ptr_attr[1] && *(ptr_attr[1])) { strcat(sql_command, ptr_attr[1]); } @@ -331,5 +333,5 @@ /* first authorlist */ else if (strcmp((ptr_asdata->ptr_first)->elname, "AUTHORLIST") == 0) { - ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "AUTHORLIST", "ROLE"); + ptr_attr = get_attr(ptr_asdata->ptr_first, "ROLE"); if (!ptr_attr || strcmp(ptr_attr, "PRIMARY") == 0) { strcpy(concat, "AUTHORLIST"); @@ -362,5 +364,5 @@ /* second pubdate */ else if (strcmp((ptr_asdata->ptr_first)->elname, "PUBDATE") == 0) { - ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "PUBDATE", "ROLE"); + ptr_attr = get_attr(ptr_asdata->ptr_first, "ROLE"); if (!ptr_attr || strcmp(ptr_attr, "PRIMARY") == 0) { strcpy(concat, "PUBDATE"); @@ -390,5 +392,5 @@ /* third title */ else if (strcmp((ptr_asdata->ptr_first)->elname, "TITLE") == 0) { - ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "TITLE", "ROLE"); + ptr_attr = get_attr(ptr_asdata->ptr_first, "ROLE"); if (!ptr_attr || strcmp(ptr_attr, "PRIMARY") == 0) { strcpy(concat, "TITLE"); @@ -419,5 +421,5 @@ } else if (strcmp((ptr_asdata->ptr_first)->elname, "USERDEF") == 0) { - ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "USERDEF", "ROLE"); + ptr_attr = get_attr(ptr_asdata->ptr_first, "ROLE"); if (strcmp(ptr_attr, "1") == 0) { strcpy(concat, "USERDEF1"); @@ -451,5 +453,5 @@ } else if (strcmp((ptr_asdata->ptr_first)->elname, "MISC") == 0) { - ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "MISC", "ROLE"); + ptr_attr = get_attr(ptr_asdata->ptr_first, "ROLE"); if (strcmp(ptr_attr, "1") == 0) { strcpy(concat, "MISC1"); @@ -477,5 +479,5 @@ } else if (strcmp((ptr_asdata->ptr_first)->elname, "LINK") == 0) { - ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "LINK", "ROLE"); + ptr_attr = get_attr(ptr_asdata->ptr_first, "ROLE"); if (strcmp(ptr_attr, "1") == 0) { strcpy(concat, "LINK1"); @@ -573,5 +575,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { - strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); + strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -600,5 +602,5 @@ strcpy(table_name, "REFSTYLE"); strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); + strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); n_chardata = 1; n_attrdata = 1; @@ -661,5 +663,5 @@ strcpy(table_name, "REFSTYLE"); strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); + strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -697,5 +699,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); + strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -722,5 +724,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); + strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -766,5 +768,5 @@ if (is_descendant_of(ptr_asdata->ptr_first, "PUBTYPE")) { strcpy(column_name, concat_elnames(ptr_asdata->ptr_first, "PUBTYPE", concat)); - strcpy(pubtype, get_ancestor_attr(ptr_asdata->ptr_first, "PUBTYPE", "TYPE")); + strcpy(pubtype, get_attr(ptr_asdata->ptr_first, "TYPE")); } else if (is_descendant_of(ptr_asdata->ptr_first, "INTEXTDEF")) { @@ -1675,4 +1677,9 @@ } } + else { + /* requested ref is not in the database */ + (*(ptr_gbdata->ptr_ndb_notfound))++; + } + free(sql_command); } |
From: Markus H. <mho...@us...> - 2004-07-26 20:37:04
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26727 Modified Files: Tag: Release_0_9_5_stable refdbdbib.c Log Message: added support for tracking number of refs not found;fixed duplicate references when using BASIS;fixed sequence errors in char tags Index: refdbdbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdbib.c,v retrieving revision 1.36.2.2 retrieving revision 1.36.2.3 diff -u -U2 -r1.36.2.2 -r1.36.2.3 --- refdbdbib.c 24 Jun 2004 20:32:16 -0000 1.36.2.2 +++ refdbdbib.c 26 Jul 2004 20:36:55 -0000 1.36.2.3 @@ -132,4 +132,5 @@ int n_mydistinct; unsigned long long n_id; + unsigned long long ndb_notfound = 0; /* number of refs not found */ size_t msg_len = 0; size_t result_len; @@ -473,4 +474,5 @@ gbdata.ptr_nmem_error = &nmem_error; gbdata.ptr_ndb_error = &ndb_error; + gbdata.ptr_ndb_notfound = &ndb_notfound; gbdata.ptr_clrequest = ptr_clrequest; @@ -534,4 +536,5 @@ } + /* tell client that data are ready */ numbyte = tiwrite(ptr_clrequest->fd, positive.text, TERM_YES); @@ -620,5 +623,5 @@ } /* now do the real query */ - sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix FROM %s where sorted_pos>0 ORDER BY id", table_name); + sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix FROM %s WHERE sorted_pos>0 ORDER BY id", table_name); } else if (strcmp(bibsequence, "BAUTHORDATE") == 0) { @@ -1026,4 +1029,6 @@ ptr_addresult->success = nref_counter - ptr_biblio_info->n_startnumber + 1; ptr_addresult->failure = nfailed; + ptr_addresult->skipped = ndb_notfound; + numbyte = tread(ptr_clrequest->fd, inbuffer, COMMAND_INBUF_LEN); if (numbyte == -1) { /* socket read error */ @@ -1256,5 +1261,5 @@ } - sprintf(sql_command, "UPDATE %s SET sorted_pos="ULLSPEC" WHERE entry_id='%s'", table_name, (unsigned long long)(*nref_counter), id_string); + sprintf(sql_command, "UPDATE %s SET sorted_pos="ULLSPEC" WHERE sorted_pos>0 AND entry_id='%s'", table_name, (unsigned long long)(*nref_counter), id_string); LOG_PRINT(LOG_DEBUG, sql_command); dbires1 = dbi_conn_query(ptr_bibconns->conn, sql_command); @@ -1365,5 +1370,5 @@ /* select all unique author_abbrevlists */ - sprintf(sql_command, "SELECT DISTINCT author_abbrevlist,pubyear,sorted_pos FROM %s ORDER BY sorted_pos", table_name); + sprintf(sql_command, "SELECT DISTINCT author_abbrevlist,pubyear,sorted_pos FROM %s WHERE sorted_pos>0 ORDER BY sorted_pos", table_name); LOG_PRINT(LOG_DEBUG, sql_command); dbires1 = dbi_conn_query(ptr_bibconns->conn, sql_command); @@ -1412,5 +1417,5 @@ } - sprintf(sql_command, "SELECT DISTINCT entry_id,sorted_pos from %s WHERE author_abbrevlist=%s AND pubyear=%d ORDER BY sorted_pos", table_name, item, n_pubyear); + sprintf(sql_command, "SELECT DISTINCT entry_id,sorted_pos from %s WHERE author_abbrevlist=%s AND pubyear=%d AND sorted_pos>0 ORDER BY sorted_pos", table_name, item, n_pubyear); LOG_PRINT(LOG_DEBUG, sql_command); @@ -2334,8 +2339,8 @@ /* this array of strings contains part of the variable names in the output file (the column names in the database) */ char tags[][50] = { - "ALLALISTSTYLE", "AUTHORLISTSTYLE", "EDITORLISTSTYLE", "SEDITORLISTSTYLE", + "ALLALISTSTYLE", "PUBDATESTYLE", "PUBDATESECSTYLE", @@ -2352,6 +2357,4 @@ "PUBPLACESTYLE", "REFNUMBERSTYLE", - "ALLALISTABBREVIATEFIRSTSTYLE", - "ALLALISTABBREVIATESUBSEQSTYLE", "AUTHORLISTABBREVIATEFIRSTSTYLE", "AUTHORLISTABBREVIATESUBSEQSTYLE", @@ -2360,12 +2363,14 @@ "SEDITORLISTABBREVIATEFIRSTSTYLE", "SEDITORLISTABBREVIATESUBSEQSTYLE", - "ALLALISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", + "ALLALISTABBREVIATEFIRSTSTYLE", + "ALLALISTABBREVIATESUBSEQSTYLE", "AUTHORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "EDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "SEDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", - "ALLALISTAUTHORNAMESNAMEOTHERINITIALSTYLE", + "ALLALISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "AUTHORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "EDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "SEDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", + "ALLALISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "SERIALSTYLE", "ADDRESSSTYLE", |
From: Markus H. <mho...@us...> - 2004-07-26 20:32:51
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25922 Modified Files: Tag: Release_0_9_5_stable refdbd.c Log Message: getbib return message now contains number of refs not found Index: refdbd.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbd.c,v retrieving revision 1.74 retrieving revision 1.74.2.1 diff -u -U2 -r1.74 -r1.74.2.1 --- refdbd.c 16 Feb 2004 21:36:11 -0000 1.74 +++ refdbd.c 26 Jul 2004 20:32:42 -0000 1.74.2.1 @@ -20,4 +20,6 @@ +++++++++++++++++++++++++*/ +/* ToDo: at startup, check for refdb database if using sqlite */ + /* ToDo: linked list for socket descriptors looks ok, but does not have much effect as long as this app is not multithreaded. Test thoroughly again as soon as multithreading is implemented. Update: With multithreading still pending (and maybe never coming) and the new fork() way of doing things the linked list does not do much anyway. The overhead is small, so probably its best to just leave it there for the time being */ @@ -1636,5 +1638,5 @@ } else { - sprintf(child_returnmsg, ULLSPEC" reference(s) formatted, "ULLSPEC" failed\n", (unsigned long long)(addresult.success), (unsigned long long)(addresult.failure)); + sprintf(child_returnmsg, ULLSPEC" reference(s) formatted, "ULLSPEC" failed, "ULLSPEC" not found\n", (unsigned long long)(addresult.success), (unsigned long long)(addresult.failure), (unsigned long long)(addresult.skipped)); } } |
From: Markus H. <mho...@us...> - 2004-07-23 02:04:05
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14476/src Modified Files: Tag: Release_0_9_5_stable xmlhandler.c Log Message: concat_elnames(): added check for null pointer to handle missing attributes gracefully Index: xmlhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.c,v retrieving revision 1.22.2.2 retrieving revision 1.22.2.3 diff -u -U2 -r1.22.2.2 -r1.22.2.3 --- xmlhandler.c 13 Jul 2004 20:34:28 -0000 1.22.2.2 +++ xmlhandler.c 23 Jul 2004 02:03:56 -0000 1.22.2.3 @@ -1116,88 +1116,88 @@ to exceed the column name limit of PostgreSQL */ ptr_attr = get_ancestor_attr(ptr_el, "AUTHORLIST", "ROLE"); - if (strcmp(ptr_attr, "PRIMARY") == 0) { - strcpy(concat, "Q"); /* AUTHORLIST */ - } - else if (strcmp(ptr_attr, "SECONDARY") == 0) { + if (ptr_attr && strcmp(ptr_attr, "SECONDARY") == 0) { strcpy(concat, "X"); /* EDITORLIST */ } - else if (strcmp(ptr_attr, "TERTIARY") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "TERTIARY") == 0) { strcpy(concat, "Y"); /* SEDITORLIST */ } - else if (strcmp(ptr_attr, "ALL") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "ALL") == 0) { strcpy(concat, "Z"); /* ALLALIST */ } + else { + strcpy(concat, "Q"); /* AUTHORLIST */ + } } else if (strcmp(ptr_el->elname, "PUBDATE") == 0) { ptr_attr = get_ancestor_attr(ptr_el, "PUBDATE", "ROLE"); - if (strcmp(ptr_attr, "PRIMARY") == 0) { - strcpy(concat, "PUBDATE"); - } - else if (strcmp(ptr_attr, "SECONDARY") == 0) { + if (ptr_attr && strcmp(ptr_attr, "SECONDARY") == 0) { strcpy(concat, "PUBDATESEC"); } - else if (strcmp(ptr_attr, "ALL") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "ALL") == 0) { strcpy(concat, "PUBDATEALL"); } + else { + strcpy(concat, "PUBDATE"); + } } else if (strcmp(ptr_el->elname, "TITLE") == 0) { ptr_attr = get_ancestor_attr(ptr_el, "TITLE", "ROLE"); - if (strcmp(ptr_attr, "PRIMARY") == 0) { - strcpy(concat, "TITLE"); - } - else if (strcmp(ptr_attr, "SECONDARY") == 0) { + if (ptr_attr && strcmp(ptr_attr, "SECONDARY") == 0) { strcpy(concat, "BOOKTITLE"); } - else if (strcmp(ptr_attr, "TERTIARY") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "TERTIARY") == 0) { strcpy(concat, "SERIESTITLE"); } - else if (strcmp(ptr_attr, "ALL") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "ALL") == 0) { strcpy(concat, "ALLTITLE"); } + else { + strcpy(concat, "TITLE"); + } } else if (strcmp(ptr_el->elname, "USERDEF") == 0) { ptr_attr = get_ancestor_attr(ptr_el, "USERDEF", "ROLE"); - if (strcmp(ptr_attr, "1") == 0) { - strcpy(concat, "USERDEF1"); - } - else if (strcmp(ptr_attr, "2") == 0) { + if (ptr_attr && strcmp(ptr_attr, "2") == 0) { strcpy(concat, "USERDEF2"); } - else if (strcmp(ptr_attr, "3") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "3") == 0) { strcpy(concat, "USERDEF3"); } - else if (strcmp(ptr_attr, "4") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "4") == 0) { strcpy(concat, "USERDEF4"); } - else if (strcmp(ptr_attr, "5") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "5") == 0) { strcpy(concat, "USERDEF5"); } + else { + strcpy(concat, "USERDEF1"); + } } else if (strcmp(ptr_el->elname, "MISC") == 0) { ptr_attr = get_ancestor_attr(ptr_el, "MISC", "ROLE"); - if (strcmp(ptr_attr, "1") == 0) { - strcpy(concat, "MISC1"); - } - else if (strcmp(ptr_attr, "2") == 0) { + if (ptr_attr && strcmp(ptr_attr, "2") == 0) { strcpy(concat, "MISC2"); } - else if (strcmp(ptr_attr, "3") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "3") == 0) { strcpy(concat, "MISC3"); } + else { + strcpy(concat, "MISC1"); + } } else if (strcmp(ptr_el->elname, "LINK") == 0) { ptr_attr = get_ancestor_attr(ptr_el, "LINK", "ROLE"); - if (strcmp(ptr_attr, "1") == 0) { - strcpy(concat, "LINK1"); - } - else if (strcmp(ptr_attr, "2") == 0) { + if (ptr_attr && strcmp(ptr_attr, "2") == 0) { strcpy(concat, "LINK2"); } - else if (strcmp(ptr_attr, "3") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "3") == 0) { strcpy(concat, "LINK3"); } - else if (strcmp(ptr_attr, "4") == 0) { + else if (ptr_attr && strcmp(ptr_attr, "4") == 0) { strcpy(concat, "LINK4"); } + else { + strcpy(concat, "LINK1"); + } } /* in all other cases we can simply use the element name */ |
From: Markus H. <mho...@us...> - 2004-07-23 02:02:17
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14220/src Modified Files: Tag: Release_0_9_5_stable strfncs.c strfncs.h Log Message: new function stricap() Index: strfncs.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/strfncs.c,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -u -U2 -r1.15.2.1 -r1.15.2.2 --- strfncs.c 6 May 2004 21:59:15 -0000 1.15.2.1 +++ strfncs.c 23 Jul 2004 02:02:07 -0000 1.15.2.2 @@ -340,4 +340,37 @@ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + stricap(): converts a string in place to lowercase, but capitalize + the first letter of each word + + char* stricap() returns a pointer to the modified string + + char* string pointer to the string to be converted + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +char* stricap(char* string) { + char* period; + + strdn(string); + /* now uppercase the first character of each word unless it is something like "the", "a" etc. */ + + /* ToDo: handle the "the", "a" etc. cases */ + period = string; + if (islower((int)(*period))) { + *period = (char)toupper((int)(*period)); + } + period++; + while (*period != '\0') { + if (ispunct((int)(*period)) || isspace((int)(*period))) { + if (islower((int)(*(period+1)))) { + *(period+1) = (char)toupper((int)(*(period+1))); + } + } + period++; + } + + return string; +} + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ compare_ptr(): compares two pointers to strings Index: strfncs.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/strfncs.h,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -U2 -r1.8 -r1.8.2.1 --- strfncs.h 29 Jun 2003 23:09:01 -0000 1.8 +++ strfncs.h 23 Jul 2004 02:02:07 -0000 1.8.2.1 @@ -54,4 +54,5 @@ char* strup(char* string); char* strdn(char* string); +char* stricap(char* string); int compare_ptr(void* ptr_one, void* ptr_two); char* mstrcat(char* destination, char* source, size_t* ptr_dest_len, size_t offset); |
From: Markus H. <mho...@us...> - 2004-07-23 01:59:38
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13796/src Modified Files: Tag: Release_0_9_5_stable backend-dbiba.c Log Message: added support for YMD pubdate sequence; added support for ICAPS title and journalname case; move out casing code as stricap() to strfncs.c Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.5 retrieving revision 1.26.2.6 diff -u -U2 -r1.26.2.5 -r1.26.2.6 --- backend-dbiba.c 18 Jul 2004 23:15:14 -0000 1.26.2.5 +++ backend-dbiba.c 23 Jul 2004 01:59:29 -0000 1.26.2.6 @@ -1347,4 +1347,72 @@ } } + else if (item_sequence && strcmp(item_sequence, "YMD") == 0) { + if (n_pubyear) { + if ((new_ref = format_year(*ptr_ref, ptr_ref_len, n_pubyear, item_yearformat, item_pad, year_unique_suffix)) == NULL) { + delete_all_lilimem(&sentinel); + return NULL; + } + else { + *ptr_ref = new_ref; + } + } + else { + /* insert dummy pubdate */ + if ((new_ref = mstrcat(*ptr_ref, dummy_year, ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + delete_all_lilimem(&sentinel); + return NULL; + } + else { + *ptr_ref = new_ref; + } + } + + /* firstsep goes in here */ + if (item_firstsep && *item_firstsep) { + if ((new_ref = mstrcat(*ptr_ref, item_firstsep, ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + delete_all_lilimem(&sentinel); + return NULL; + } + else { + *ptr_ref = new_ref; + } + } + + if (item_dateother && *item_dateother) { + nhave_content = 1; + + if ((new_ref = format_month(*ptr_ref, ptr_ref_len, item_dateother, item_monthformat, item_pad, dbires_cit)) == NULL) { + delete_all_lilimem(&sentinel); + return NULL; + } + else { + *ptr_ref = new_ref; + } + } + + /* secondsep goes in here */ + if (item_secondsep && *item_secondsep) { + if ((new_ref = mstrcat(*ptr_ref, item_secondsep, ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + delete_all_lilimem(&sentinel); + return NULL; + } + else { + *ptr_ref = new_ref; + } + } + + if (item_dateother && *item_dateother) { + if ((new_ref = format_day(*ptr_ref, ptr_ref_len, item_dateother, item_dayformat, item_pad)) == NULL) { + delete_all_lilimem(&sentinel); + return NULL; + } + else { + *ptr_ref = new_ref; + } + } + } } else if (n_pubyear) { @@ -1456,5 +1524,5 @@ enum refdb_col n_preceeding_index; enum refdb_col n_following_index; - int n_uplow = 0; /* 0=asis, 1=uppercase, 2=lowercase */ + int n_uplow = 0; /* 0=asis, 1=uppercase, 2=lowercase, 3=initialcaps */ /* dbi_conn conn; */ @@ -1477,4 +1545,7 @@ n_uplow = 2; } + else if (citem && strcmp(citem, "ICAPS") == 0) { + n_uplow = 3; + } strcpy(role, "JOUR"); break; @@ -1490,4 +1561,7 @@ n_uplow = 2; } + else if (citem && strcmp(citem, "ICAPS") == 0) { + n_uplow = 3; + } strcpy(role, "BOOK"); break; @@ -1503,4 +1577,7 @@ n_uplow = 2; } + else if (citem && strcmp(citem, "ICAPS") == 0) { + n_uplow = 3; + } strcpy(role, "SERIES"); break; @@ -1537,4 +1614,7 @@ n_uplow = 2; } + else if (citem && strcmp(citem, "ICAPS") == 0) { + n_uplow = 3; + } strcpy(role, "ALL"); break; @@ -1606,4 +1686,7 @@ strdn(real_item_title); } + else if (n_uplow == 3) { /* initial caps */ + stricap(real_item_title); + } /* else: leave as is */ @@ -1839,20 +1922,7 @@ else if (citem && strcmp(citem, "LOWER") == 0) { strdn(mod_periodical); - /* now uppercase the first character of each word unless it is something like "the", "a" etc. */ - - /* ToDo: handle the "the", "a" etc. cases */ - period = mod_periodical; - if (islower((int)(*period))) { - *period = (char)toupper((int)(*period)); - } - period++; - while (*period != '\0') { - if (ispunct((int)(*period)) || isspace((int)(*period))) { - if (islower((int)(*(period+1)))) { - *(period+1) = (char)toupper((int)(*(period+1))); - } - } - period++; - } + } + else if (citem && strcmp(citem, "ICAPS") == 0) { + stricap(mod_periodical); } /* else: asis needs no changes */ |
From: Markus H. <mho...@us...> - 2004-07-23 01:56:47
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13557/scripts Modified Files: Tag: Release_0_9_5_stable refdb-bug.in Log Message: added option to protect passwords Index: refdb-bug.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/refdb-bug.in,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -U2 -r1.2 -r1.2.2.1 --- refdb-bug.in 13 Dec 2002 20:33:55 -0000 1.2 +++ refdb-bug.in 23 Jul 2004 01:56:39 -0000 1.2.2.1 @@ -8,5 +8,6 @@ # deliberately to allow users to file a bug report without the foggiest # notion of Unix concepts like redirection. -outfile="refdb-bug.txt" +outfile="refdb-bug.tmp" +reportfile="refdb-bug.txt" sysconfdir="<sysconfdir>" REFDBLIB="<refdblib>" @@ -103,8 +104,21 @@ cat $HOME/.bib2risrc | grep "^[^#]" >> $outfile 2>&1 echo "" -echo "***********************************************************" -echo "Output was written to ./$outfile" -echo "Please append this file to all bug reports" -echo "WARNING: ./$outfile might contain plain-text passwords" -echo "***********************************************************" +echo "************************************************************" >&2 +echo "WARNING: ./$reportfile might contain plain-text passwords" >&2 +echo "Do you want me to protect these passwords from prying eyes?" >&2 +echo "************************************************************" >&2 +echo -n "[Y/n]" >&2 +read STRIP + +if [ "$STRIP" = "n" ] || [ "$STRIP" = "N" ];then + mv $outfile $reportfile +else +# the square brackets contain a space and a tab + sed 's/^\(passwd[ ]*\).*/\1<protected>/' < $outfile > $reportfile && rm $outfile +fi + +echo "************************************************************" >&2 +echo "Output was written to ./$reportfile" >&2 +echo "Please append this file to all bug reports" >&2 +echo "************************************************************" >&2 |
From: Markus H. <mho...@us...> - 2004-07-23 01:56:17
|
Update of /cvsroot/refdb/refdb/dtd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13524/dtd Modified Files: Tag: Release_0_9_5_stable citestylex.dtd Log Message: changed PUBTYPE TYPE attribute to required;added YMD pubdate sequence;added ICAPS title and journalname case;bumped up version number Index: citestylex.dtd =================================================================== RCS file: /cvsroot/refdb/refdb/dtd/citestylex.dtd,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -u -U2 -r1.7.2.1 -r1.7.2.2 --- citestylex.dtd 15 Jun 2004 22:24:28 -0000 1.7.2.1 +++ citestylex.dtd 23 Jul 2004 01:56:09 -0000 1.7.2.2 @@ -4,5 +4,5 @@ <!-- suggested invocation: --> -<!-- <!DOCTYPE CITESTYLE PUBLIC "-//Markus Hoenicka//DTD CiteStyle V1.1//EN" "http://refdb.sourceforge.net/dtd/citestylex-1.1/citestylex.dtd"> --> +<!-- <!DOCTYPE CITESTYLE PUBLIC "-//Markus Hoenicka//DTD CiteStyle V1.2//EN" "http://refdb.sourceforge.net/dtd/citestylex-1.2/citestylex.dtd"> --> <!ELEMENT STYLESET (CITESTYLE)+> @@ -16,5 +16,5 @@ <!ELEMENT PUBTYPE (((REFNUMBER | AUTHORLIST | PUBDATE | TITLE | JOURNALNAME | VOLUME | ISSUE | PAGES | PUBLISHER | PUBPLACE | SERIAL | ADDRESS | URL | USERDEF | MISC | NOTES | ABSTRACT | LINK), SEPARATOR?)+)> -<!ATTLIST PUBTYPE TYPE (ABST|ADVS|ART|BILL|BOOK|CASE|CHAP|COMP|CONF|CTLG|DATA|ELEC|GEN|ICOMM|INPR|JFULL|JOUR|MAP|MGZN|MPCT|MUSIC|NEWS|PAMP|PAT|PCOMM|RPRT|SER|SLIDE|SOUND|STAT|THES|UNBILL|UNPB|VIDEO) "GEN"> +<!ATTLIST PUBTYPE TYPE (ABST|ADVS|ART|BILL|BOOK|CASE|CHAP|COMP|CONF|CTLG|DATA|ELEC|GEN|ICOMM|INPR|JFULL|JOUR|MAP|MGZN|MPCT|MUSIC|NEWS|PAMP|PAT|PCOMM|RPRT|SER|SLIDE|SOUND|STAT|THES|UNBILL|UNPB|VIDEO) #REQUIRED> <!ELEMENT INTEXTDEF (((REFNUMBER | AUTHORLIST | PUBDATE | TITLE | JOURNALNAME | VOLUME | ISSUE | PAGES | PUBLISHER | PUBPLACE), SEPARATOR?)+)> @@ -86,5 +86,5 @@ <!ATTLIST PUBDATE FORMAT (YES | NO) "NO" - SEQUENCE (MDY | DMY | MY | Y) "Y" + SEQUENCE (MDY | DMY | YMD | MY | Y) "Y" MONTHFORMAT (FULL | ABBREVDOT | THREELETTER | ARABICMONTH | ROMANMONTH) "ARABICMONTH" DAYFORMAT (ARABICDAY | ROMANDAY) "ARABICDAY" @@ -100,5 +100,5 @@ <!ELEMENT TITLE (PRECEEDING?, FOLLOWING?)> -<!ATTLIST TITLE CASE (ASIS | UPPER | LOWER) "ASIS" +<!ATTLIST TITLE CASE (ASIS | UPPER | LOWER | ICAPS) "ASIS" STYLE (BOLD | ITALIC | BOLDITALIC | SUPER | SUB | ULINE | BOLDULINE | ITULINE | BOLDITULINE | NONE) #IMPLIED ROLE (PRIMARY | SECONDARY | TERTIARY | ALL) "PRIMARY"> @@ -107,5 +107,5 @@ <!ELEMENT JOURNALNAME (PRECEEDING?, FOLLOWING?)> -<!ATTLIST JOURNALNAME CASE (ASIS | UPPER | LOWER) "ASIS" +<!ATTLIST JOURNALNAME CASE (ASIS | UPPER | LOWER | ICAPS) "ASIS" DEFAULTTEXT (ABBREV | FULL | USERONE | USERTWO) "ABBREV" ALTERNATETEXT (AABBREV | AFULL | AUSERONE | AUSERTWO) "AFULL" |
From: Markus H. <mho...@us...> - 2004-07-18 23:15:25
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15621 Modified Files: Tag: Release_0_9_5_stable backend-dbiba.c Log Message: format_day():fixed incorrect date output Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.4 retrieving revision 1.26.2.5 diff -u -U2 -r1.26.2.4 -r1.26.2.5 --- backend-dbiba.c 24 Jun 2004 20:29:57 -0000 1.26.2.4 +++ backend-dbiba.c 18 Jul 2004 23:15:14 -0000 1.26.2.5 @@ -2932,6 +2932,6 @@ } } - else if (day_len == 3 && *(slashes[0]+1) == '0' && strcmp(pad, "NN") == 0) { - the_day[0] = *(slashes[0]+2); + else if (day_len == 3 && *(slashes[1]+1) == '0' && strcmp(pad, "NN") == 0) { + the_day[0] = *(slashes[1]+2); the_day[1] = '\0'; } |
From: Markus H. <mho...@us...> - 2004-07-15 20:36:03
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18719 Modified Files: mods_endhandler.c Log Message: added errno.h Index: mods_endhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/mods_endhandler.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -U2 -r1.1 -r1.2 --- mods_endhandler.c 17 May 2004 23:12:51 -0000 1.1 +++ mods_endhandler.c 15 Jul 2004 20:35:52 -0000 1.2 @@ -30,4 +30,5 @@ #include <iconv.h> #include <dbi/dbi.h> +#include <errno.h> #include "backend.h" |
From: Markus H. <mho...@us...> - 2004-07-15 20:34:30
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18474 Modified Files: mods_checkdup.c Log Message: assorted attempts to get the name and titleinfo stuff going Index: mods_checkdup.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/mods_checkdup.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -U2 -r1.1 -r1.2 --- mods_checkdup.c 20 Jun 2004 21:42:51 -0000 1.1 +++ mods_checkdup.c 15 Jul 2004 20:34:21 -0000 1.2 @@ -100,4 +100,5 @@ size_t sql_cmd_len; unsigned long long n_titleinfo_id = 0; + unsigned long long n_titleparts_id = 0; struct lilimem sentinel; struct titleinfo_lists* ptr_titleinfolists; @@ -108,5 +109,5 @@ dbi_driver driver; -/* printf("process %s with parent %s\n", ptr_titleinfo->objectName, ptr_titleinfo->parent); */ + printf("process %s with parent %s\n", ptr_titleinfo->objectName, ptr_titleinfo->parent); sentinel.ptr_mem = NULL; @@ -309,4 +310,6 @@ goto finish; } + + printf("prepare SQL command 1\n"); /* assemble sql command */ @@ -360,6 +363,6 @@ goto finish; } - - sprintf(sql_command, "SELECT titleparts_id FROM t_titleparts WHERE titleparts_value=%s AND titleparts_type=\'%s\' AND titleinfo_id="ULLSPEC"", value_q, ptr_curr_content->name, n_titleinfo_id); + /* todo: titleinfo_id IN () ? */ + sprintf(sql_command, "SELECT titleparts_id FROM t_titleparts WHERE titleparts_value=%s AND titleparts_type=\'%s\' AND titleinfo_id IN (%s)", value_q, ptr_curr_content->name, lilid_to_string(&(ptr_titleinfolists->titleinfo))); free(value_q); @@ -378,6 +381,5 @@ IDs for the duplicate check */ while (dbi_result_next_row(dbires)) { - /* abuse n_subject_id */ - n_titleinfo_id = dbi_result_get_ulonglong_idx(dbires, 1); + n_titleparts_id = dbi_result_get_ulonglong_idx(dbires, 1); if (dbi_conn_error_flag(dbi_result_get_conn(dbires))) { continue; @@ -400,4 +402,5 @@ } + printf("result went to %d<<\n", result); if (result) { n_titleinfo_id = 0; @@ -420,5 +423,5 @@ /* now we've got the bits and pieces. Assemble a monster query */ - sprintf(sql_command, "SELECT titleinfo_id FROM t_titleinfo, t_titleparts WHERE t_titleinfo.titleinfo_id IN (%s)", lilid_to_string(&(ptr_titleinfolists->titleinfo))); + sprintf(sql_command, "SELECT t_titleinfo.titleinfo_id FROM t_titleinfo, t_titleparts WHERE t_titleinfo.titleinfo_id IN (%s)", lilid_to_string(&(ptr_titleinfolists->titleinfo))); for (i=0;i<5;i++) { @@ -446,5 +449,7 @@ } + /* todo: if the list contains no entry, select for count()=0 */ while ((ptr_curr_lilid = get_next_lilid(ptr_curr_lilid)) != NULL) { + printf("in while loop\n"); sprintf(buffer, " AND t_titleparts.titleparts_id="ULLSPEC" AND t_titleparts.titleparts_type=\'%s\' AND t_titleparts.titleinfo_id=t_titleinfo.titleinfo_id ", ptr_curr_lilid->value, type); new_sql_command = mstrcat(sql_command, buffer, &sql_cmd_len, 0); @@ -868,5 +873,5 @@ } else if (!strcmp(ptr_curr_content->name, "namePart")) { - sprintf(sql_command, "SELECT namepart_id FROM t_nameparts WHERE nameparts_value%s%s AND nameparts_type%s%s AND nameparts_pos%s%s", value_op, value_q, attvalue_op, attvalue_q, attvalue1_op, attvalue1_q); + sprintf(sql_command, "SELECT nameparts_id FROM t_nameparts WHERE nameparts_value%s%s AND nameparts_type%s%s AND nameparts_pos%s%s", value_op, value_q, attvalue_op, attvalue_q, attvalue1_op, attvalue1_q); } else { /* displayForm, affiliation, description */ @@ -930,5 +935,5 @@ /* now we've got the bits and pieces. Assemble a monster query */ - sprintf(sql_command, "SELECT name_id FROM t_name, t_nameparts, t_roleterm, t_nameval WHERE t_name.name_id IN (%s)", lilid_to_string(&(ptr_namelists->name))); + sprintf(sql_command, "SELECT t_name.name_id FROM t_name, t_nameparts, t_roleterm, t_nameval WHERE t_name.name_id IN (%s)", lilid_to_string(&(ptr_namelists->name))); ptr_curr_lilid = &(ptr_namelists->roleterm); |
From: Markus H. <mho...@us...> - 2004-07-13 20:34:42
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5994 Modified Files: Tag: Release_0_9_5_stable xmlhandler.c Log Message: use GEN as default pubtype if none is specified;fixed a couple of segfaults caused by missing attributes Index: xmlhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.c,v retrieving revision 1.22.2.1 retrieving revision 1.22.2.2 diff -u -U2 -r1.22.2.1 -r1.22.2.2 --- xmlhandler.c 15 Jun 2004 22:30:27 -0000 1.22.2.1 +++ xmlhandler.c 13 Jul 2004 20:34:28 -0000 1.22.2.2 @@ -123,6 +123,11 @@ if (strcmp(el, "PUBTYPE") == 0) { - /* create new entry in database. PUBTYPE has only one attribute TYPE, the value of which is therefore in attr[1] */ - strcat(sql_command, ptr_attr[1]); + /* create new entry in database. PUBTYPE has only one attribute TYPE, the value of which is therefore in attr[1], if at all */ + if (ptr_attr[1] && *(ptr_attr[1])) { + strcat(sql_command, ptr_attr[1]); + } + else { + strcat(sql_command, "GEN"); /* default as per DTD */ + } } else if (strcmp(el, "INTEXTDEF") == 0) { @@ -327,5 +332,5 @@ else if (strcmp((ptr_asdata->ptr_first)->elname, "AUTHORLIST") == 0) { ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "AUTHORLIST", "ROLE"); - if (strcmp(ptr_attr, "PRIMARY") == 0) { + if (!ptr_attr || strcmp(ptr_attr, "PRIMARY") == 0) { strcpy(concat, "AUTHORLIST"); } @@ -358,5 +363,5 @@ else if (strcmp((ptr_asdata->ptr_first)->elname, "PUBDATE") == 0) { ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "PUBDATE", "ROLE"); - if (strcmp(ptr_attr, "PRIMARY") == 0) { + if (!ptr_attr || strcmp(ptr_attr, "PRIMARY") == 0) { strcpy(concat, "PUBDATE"); } @@ -386,5 +391,5 @@ else if (strcmp((ptr_asdata->ptr_first)->elname, "TITLE") == 0) { ptr_attr = get_ancestor_attr(ptr_asdata->ptr_first, "TITLE", "ROLE"); - if (strcmp(ptr_attr, "PRIMARY") == 0) { + if (!ptr_attr || strcmp(ptr_attr, "PRIMARY") == 0) { strcpy(concat, "TITLE"); } |
From: Markus H. <mho...@us...> - 2004-07-13 20:30:30
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4793 Modified Files: Tag: Release_0_9_5_stable risdata.c Log Message: use GEN as a default type Index: risdata.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risdata.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -U2 -r1.5 -r1.5.2.1 --- risdata.c 3 Jan 2004 20:11:44 -0000 1.5 +++ risdata.c 13 Jul 2004 20:30:21 -0000 1.5.2.1 @@ -142,5 +142,6 @@ *(ptr_risdata->endpage) = '\0'; *(ptr_risdata->startpage) = '\0'; - *(ptr_risdata->type) = '\0'; +/* *(ptr_risdata->type) = '\0'; */ + strcpy(ptr_risdata->type, "GEN"); /* use GEN as a default */ ptr_risdata->url = NULL; ptr_risdata->abstract = NULL; |
From: Markus H. <mho...@us...> - 2004-07-13 20:29:18
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4375 Modified Files: Tag: Release_0_9_5_stable backend-dbib.c Log Message: attempt to fix the incorrect rendering of CASE titles Index: backend-dbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.c,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -u -U2 -r1.28 -r1.28.2.1 --- backend-dbib.c 19 Mar 2004 23:23:11 -0000 1.28 +++ backend-dbib.c 13 Jul 2004 20:29:08 -0000 1.28.2.1 @@ -1501,5 +1501,7 @@ else if (strcmp(item_type, "TITLE") == 0) { if (!n_intext) { - if (strcmp(pubtype, "CHAP") == 0) { + if (strcmp(pubtype, "CHAP") == 0 + /* todo: is this the correct fix? */ + || strcmp(pubtype, "CASE") == 0) { strcpy(mset_string, "chapter"); } |
From: Markus H. <mho...@us...> - 2004-07-12 21:52:09
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25272 Modified Files: Tag: Release_0_9_5_stable refdba.c Log Message: pass help option through to command in batch mode; check for valid command name in batch mode; fixed length of username string Index: refdba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdba.c,v retrieving revision 1.45 retrieving revision 1.45.2.1 diff -u -U2 -r1.45 -r1.45.2.1 --- refdba.c 1 May 2004 14:56:03 -0000 1.45 +++ refdba.c 12 Jul 2004 21:51:58 -0000 1.45.2.1 @@ -115,5 +115,5 @@ char port_address[PREFS_BUF_LEN] = "9734"; /*+ default port address of refdbd +*/ char the_pager[PREFS_BUF_LEN] = "stdout"; /*+ default "pager" (stdout) +*/ -char username[USERNAME_LENGTH + 1] = ""; /*+ default username (emtpy) +*/ +char username[PREFS_BUF_LEN] = ""; /*+ default username (emtpy) +*/ char passwd[PREFS_BUF_LEN] = "*"; /*+ default password (ask user) +*/ char refdb_timeout[PREFS_BUF_LEN] = "60"; /*+ 60 seconds default timeout +*/ @@ -268,4 +268,8 @@ strncpy(the_cmd, optarg, 31); the_cmd[31] = '\0'; + if (!find_command(optarg, commands)) { + fprintf (stderr, "%s: No such command for refdb.\n", optarg); + exit (1); + } n_batchmode = 1; break; @@ -275,6 +279,17 @@ break; case 'h': - fprintf(stderr, "Usage: refdba [-c pager] [-C command] [-e logdest] [-h] [-i IP_address] [-l loglevel] [-L logfile] [-p port] [-q] [-T time] [-u name] [-v] [-V] [-w password] [-y confdir]\nOptions: -c command to run a pager\n -C run command in batch mode\n -e log destination (0=stderr;1=syslog;2=custom file)\n -h prints this help\n -i set server IP address to address\n -l log level (0<=level<=7)\n -L full path to custom log file\n -p set server port to port\n -q ignore init-file\n -T set timeout to time seconds\n -u set username\n -v show version information\n -V switch to verbose mode\n -w password (use '*' to be asked interactively)\n -y look for configuration files in confdir\n"); - exit (0); + if (!n_batchmode) { + fprintf(stderr, "Usage: refdba [-c pager] [-C command] [-e logdest] [-h] [-i IP_address] [-l loglevel] [-L logfile] [-p port] [-q] [-T time] [-u name] [-v] [-V] [-w password] [-y confdir]\nOptions: -c command to run a pager\n -C run command in batch mode\n -e log destination (0=stderr;1=syslog;2=custom file)\n -h prints this help\n -i set server IP address to address\n -l log level (0<=level<=7)\n -L full path to custom log file\n -p set server port to port\n -q ignore init-file\n -T set timeout to time seconds\n -u set username\n -v show version information\n -V switch to verbose mode\n -w password (use '*' to be asked interactively)\n -y look for configuration files in confdir\n"); + exit (0); + } + else { + if ((new_the_command = mstrcat(the_command, " -h ", &the_command_len, 0)) == NULL) { + fprintf(stderr, "out of memory\n"); + exit (1); + } + else { + the_command = new_the_command; + } + } break; case 'i': |
From: Markus H. <mho...@us...> - 2004-07-10 19:58:59
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20955 Modified Files: Tag: Release_0_9_5_stable refdbxml.in Log Message: fixed line wrapping typo Index: refdbxml.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/refdbxml.in,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -U2 -r1.12.2.1 -r1.12.2.2 --- refdbxml.in 27 Jun 2004 22:24:30 -0000 1.12.2.1 +++ refdbxml.in 10 Jul 2004 19:58:49 -0000 1.12.2.2 @@ -259,7 +259,5 @@ # if using fop and config file is specified, then check config file exists -[ "$fo_processor" = "fop" ] && [ -n "$fop_config_file" ] && [ ! -r -${fop_config_file##-c } ] && echo "unable to access fop configuration -file: ${fop_config_file##-c }" && fop_config_file="" +[ "$fo_processor" = "fop" ] && [ -n "$fop_config_file" ] && [ ! -r ${fop_config_file##-c } ] && echo "unable to access fop configuration file: ${fop_config_file##-c }" && fop_config_file="" # on Win32-cygwin, the native Win32 tools want the DOS path |