[Refdb-cvs] CVS: refdb/src backend-bibtex.c,1.14,1.15 backend-dbib.c,1.25,1.26 backend.c,1.21,1.22 n
Status: Beta
Brought to you by:
mhoenicka
|
From: Markus H. <mho...@us...> - 2004-01-03 20:11:49
|
Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5871/src
Modified Files:
backend-bibtex.c backend-dbib.c backend.c noteshandler.c
refdbda.c refdbdbib.c refdbdnote.c refdbdref.c risdata.c
risdb.c risxhandler.c xmlhandler.c
Log Message:
reverted support for new libdbi API as that change was reverted as well
Index: backend-bibtex.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/backend-bibtex.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -U2 -r1.14 -r1.15
--- backend-bibtex.c 28 Dec 2003 23:44:22 -0000 1.14
+++ backend-bibtex.c 3 Jan 2004 20:11:43 -0000 1.15
@@ -52,9 +52,4 @@
static char* bibtexify_author(char** ptr_bibauthor, char* author);
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
-
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -156,5 +151,5 @@
/* retrieve basic information about the bibliography style from CITSTYLE into ptr_result */
quoted_journal = mstrdup((ptr_rendinfo->ptr_biblio_info)->format_string);
- if (!dbi_driver_quote_string_inplace(driver, "ed_journal)) {
+ if (!dbi_driver_quote_string(driver, "ed_journal)) {
LOG_PRINT(LOG_WARNING, outomem.text);
free(sql_command);
Index: backend-dbib.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/backend-dbib.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -U2 -r1.25 -r1.26
--- backend-dbib.c 28 Dec 2003 23:44:22 -0000 1.25
+++ backend-dbib.c 3 Jan 2004 20:11:43 -0000 1.26
@@ -45,8 +45,4 @@
static char* set_mset(char* current_mset, char* new_mset, char** ref, size_t* ptr_ref_len);
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -86,5 +82,5 @@
}
- if (dbi_driver_quote_string_inplace(dbi_conn_get_driver(conn), &myjournal) == -1) {
+ if (dbi_driver_quote_string(dbi_conn_get_driver(conn), &myjournal) == -1) {
LOG_PRINT(LOG_WARNING, outomem.text);
free(myjournal);
@@ -261,5 +257,5 @@
}
- if (dbi_driver_quote_string_inplace(dbi_conn_get_driver(ptr_bibconns->conn_refdb), &myjournal) == -1) {
+ if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_bibconns->conn_refdb), &myjournal) == -1) {
LOG_PRINT(LOG_WARNING, outomem.text);
delete_all_lilimem(&sentinel);
@@ -893,5 +889,5 @@
}
- if (dbi_driver_quote_string_inplace(dbi_conn_get_driver(ptr_bibconns->conn_refdb), &myjournal) == -1) {
+ if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_bibconns->conn_refdb), &myjournal) == -1) {
LOG_PRINT(LOG_WARNING, outomem.text);
delete_all_lilimem(&sentinel);
Index: backend.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/backend.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -U2 -r1.21 -r1.22
--- backend.c 26 Dec 2003 21:16:11 -0000 1.21
+++ backend.c 3 Jan 2004 20:11:43 -0000 1.22
@@ -47,9 +47,4 @@
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
-
@@ -2326,5 +2321,5 @@
return -1;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_username) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_username) == -1) {
free(quoted_username);
free(sql_command);
Index: noteshandler.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/noteshandler.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -U2 -r1.9 -r1.10
--- noteshandler.c 26 Dec 2003 21:16:11 -0000 1.9
+++ noteshandler.c 3 Jan 2004 20:11:43 -0000 1.10
@@ -48,8 +48,4 @@
static int set_notesdata_int_field(const char* field, unsigned long long n_value, dbi_conn conn, dbi_driver driver, unsigned long long n_note_id);
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
@@ -1050,5 +1046,5 @@
return 1;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_value) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_value) == -1) {
free(quoted_value);
LOG_PRINT(LOG_WARNING, "malloc failed");
@@ -1175,5 +1171,5 @@
/* quote target to make it usable for a SQL query */
if ((quoted_target = strdup(target)) == NULL
- || dbi_driver_quote_string_inplace(driver, "ed_target) == -1) {
+ || dbi_driver_quote_string(driver, "ed_target) == -1) {
LOG_PRINT(LOG_WARNING, "malloc failed");
free(sql_command);
Index: refdbda.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/refdbda.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -U2 -r1.36 -r1.37
--- refdbda.c 28 Dec 2003 23:42:05 -0000 1.36
+++ refdbda.c 3 Jan 2004 20:11:43 -0000 1.37
@@ -82,8 +82,4 @@
#endif
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -740,5 +736,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &myarg) == -1) {
+ if (dbi_driver_quote_string(driver, &myarg) == -1) {
dbi_conn_close(conn);
free(myarg);
@@ -804,5 +800,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &myarg) == -1) {
+ if (dbi_driver_quote_string(driver, &myarg) == -1) {
dbi_conn_close(conn);
free(myarg);
@@ -1580,5 +1576,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &mytoken) == -1) {
+ if (dbi_driver_quote_string(driver, &mytoken) == -1) {
free(mytoken);
failed++;
@@ -1669,5 +1665,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &myarg) == -1) {
+ if (dbi_driver_quote_string(driver, &myarg) == -1) {
if (ptr_clrequest->n_cgi) {
iwrite(ptr_clrequest->fd, cgihead_plain.text, cgihead_plain.length);
Index: refdbdbib.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/refdbdbib.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -U2 -r1.28 -r1.29
--- refdbdbib.c 28 Dec 2003 23:44:22 -0000 1.28
+++ refdbdbib.c 3 Jan 2004 20:11:43 -0000 1.29
@@ -73,8 +73,4 @@
static void close_dbi_connections(struct BIBCONNS* ptr_bibconns, const char* drivername);
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -266,5 +262,5 @@
}
- if (dbi_driver_quote_string_inplace(dbi_conn_get_driver(bibconns.conn_refdb), &myjournal) == -1) {
+ if (dbi_driver_quote_string(dbi_conn_get_driver(bibconns.conn_refdb), &myjournal) == -1) {
LOG_PRINT(LOG_WARNING, outomem.text);
delete_all_lilimem(&sentinel);
@@ -1176,5 +1172,5 @@
}
- if (dbi_driver_quote_string_inplace(dbi_conn_get_driver(ptr_bibconns->conn), &authorlist_buffer) == -1) {
+ if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_bibconns->conn), &authorlist_buffer) == -1) {
iwrite(ptr_clrequest->fd, "", 1);
if (!assemble_return_msg(ptr_addresult, noformatupdatecolon.text, ptr_bibconns->conn)) {
@@ -1621,5 +1617,5 @@
}
- if (dbi_driver_quote_string_inplace(driver, &myarg) == -1) {
+ if (dbi_driver_quote_string(driver, &myarg) == -1) {
LOG_PRINT(LOG_WARNING, outomem.text);
iwrite(ptr_clrequest->fd, outomem_n.text, outomem_n.length);
@@ -1693,5 +1689,5 @@
}
- if (dbi_driver_quote_string_inplace(driver, &myarg) == -1) {
+ if (dbi_driver_quote_string(driver, &myarg) == -1) {
LOG_PRINT(LOG_WARNING, outomem.text);
iwrite(ptr_clrequest->fd, outomem_n.text, outomem_n.length);
Index: refdbdnote.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/refdbdnote.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -U2 -r1.11 -r1.12
--- refdbdnote.c 28 Dec 2003 23:44:22 -0000 1.11
+++ refdbdnote.c 3 Jan 2004 20:11:43 -0000 1.12
@@ -48,8 +48,4 @@
extern int n_log_level; /* numeric version of log_level */
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -736,5 +732,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -776,5 +772,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -843,5 +839,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -983,5 +979,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1023,5 +1019,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1084,5 +1080,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1223,5 +1219,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1263,5 +1259,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1324,5 +1320,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1498,5 +1494,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1613,5 +1609,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -1789,5 +1785,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2242,5 +2238,5 @@
else {
if ((quoted_token = strdup(ptr_curr->value)) == NULL
- || dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ || dbi_driver_quote_string(driver, "ed_token) == -1) {
iwrite(ptr_clrequest->fd, outomem_n.text, outomem_n.length);
ptr_addresult->failure++;
Index: refdbdref.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -U2 -r1.47 -r1.48
--- refdbdref.c 28 Dec 2003 23:44:22 -0000 1.47
+++ refdbdref.c 3 Jan 2004 20:11:44 -0000 1.48
@@ -62,8 +62,4 @@
static int real_run_keyword_scan(struct CLIENT_REQUEST* ptr_clrequest, Lilid* ptr_sentinel, int mode, int* ptr_insert);
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -2198,5 +2194,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2242,5 +2238,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2315,5 +2311,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2453,5 +2449,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2493,5 +2489,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2560,5 +2556,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2733,5 +2729,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -2829,5 +2825,5 @@
return 0;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
dbi_conn_close(conn);
delete_all_lilimem(&sentinel);
@@ -2942,5 +2938,5 @@
return 0;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
dbi_conn_close(conn);
delete_all_lilimem(&sentinel);
@@ -2989,5 +2985,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -3113,5 +3109,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -3526,5 +3522,5 @@
break;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
error = 1;
break;
@@ -3641,5 +3637,5 @@
return 0;
}
- if (dbi_driver_quote_string_inplace(driver, "ed_token) == -1) {
+ if (dbi_driver_quote_string(driver, "ed_token) == -1) {
dbi_conn_close(conn);
delete_all_lilimem(&sentinel);
Index: risdata.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/risdata.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -U2 -r1.4 -r1.5
--- risdata.c 26 Dec 2003 21:16:12 -0000 1.4
+++ risdata.c 3 Jan 2004 20:11:44 -0000 1.5
@@ -31,8 +31,4 @@
extern int n_log_level;
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -196,5 +192,5 @@
/* escape any characters that the db cannot digest */
- if (dbi_driver_quote_string_inplace(dbidrv, &escape_buffer) == -1) {
+ if (dbi_driver_quote_string(dbidrv, &escape_buffer) == -1) {
free(escape_buffer);
LOG_PRINT(LOG_WARNING, "malloc failed");
@@ -368,5 +364,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(escape_buffer);
Index: risdb.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/risdb.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -U2 -r1.35 -r1.36
--- risdb.c 26 Dec 2003 21:16:12 -0000 1.35
+++ risdb.c 3 Jan 2004 20:11:44 -0000 1.36
@@ -55,9 +55,4 @@
static int update_user_field(const char* fieldvalue, unsigned long long n_refdb_id, unsigned long long n_user_id, dbi_conn conn, dbi_driver driver, const char* query_stub, const char* errmsg);
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
-
@@ -143,5 +138,5 @@
strup(mytoken); /* convert token to uppercase */
- if (dbi_driver_quote_string_inplace(dbi_conn_get_driver(conn), &mytoken) == -1) {
+ if (dbi_driver_quote_string(dbi_conn_get_driver(conn), &mytoken) == -1) {
free(dest);
free(mytoken);
@@ -910,5 +905,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &(perinfo.full)) == -1) {
+ if (dbi_driver_quote_string(driver, &(perinfo.full)) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
iwrite(ptr_clrequest->fd, "out of memory\n", 14);
@@ -927,5 +922,5 @@
}
- if (dbi_driver_quote_string_inplace(driver, &(perinfo.custabbrev1)) == -1) {
+ if (dbi_driver_quote_string(driver, &(perinfo.custabbrev1)) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
iwrite(ptr_clrequest->fd, "out of memory\n", 14);
@@ -944,5 +939,5 @@
}
- if (dbi_driver_quote_string_inplace(driver, &(perinfo.custabbrev2)) == -1) {
+ if (dbi_driver_quote_string(driver, &(perinfo.custabbrev2)) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
iwrite(ptr_clrequest->fd, "out of memory\n", 14);
@@ -965,5 +960,5 @@
dotify_journal(perinfo.abbrev, conn, conn_refdb);
- if (dbi_driver_quote_string_inplace(driver, &(perinfo.abbrev)) == -1) {
+ if (dbi_driver_quote_string(driver, &(perinfo.abbrev)) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
iwrite(ptr_clrequest->fd, "out of memory\n", 14);
@@ -2063,5 +2058,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
return 1;
@@ -2166,5 +2161,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(sql_command);
@@ -2228,5 +2223,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &another_escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(sql_command);
@@ -2283,5 +2278,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &another_escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(sql_command);
@@ -2338,5 +2333,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &another_escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(sql_command);
@@ -2393,5 +2388,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &another_escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(sql_command);
@@ -2477,5 +2472,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(sql_command);
@@ -2577,5 +2572,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
free(sql_command);
@@ -2663,5 +2658,5 @@
/* escape any characters that the database server cannot digest */
- if (dbi_driver_quote_string_inplace(driver, &escape_buffer) == -1) {
+ if (dbi_driver_quote_string(driver, &escape_buffer) == -1) {
LOG_PRINT(LOG_WARNING, "out of memory");
return 1;
Index: risxhandler.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/risxhandler.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -U2 -r1.19 -r1.20
--- risxhandler.c 28 Dec 2003 00:44:37 -0000 1.19
+++ risxhandler.c 3 Jan 2004 20:11:44 -0000 1.20
@@ -53,9 +53,4 @@
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
-
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -653,5 +648,5 @@
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_inplace(ptr_ardata->driver, &((ptr_ardata->perinfo).full)) == -1) {
+ 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)++;
@@ -666,5 +661,5 @@
}
else if (title_type && !strcmp(title_type, "abbrev")) {
- if (((ptr_ardata->perinfo).abbrev = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string_inplace(ptr_ardata->driver, &((ptr_ardata->perinfo).abbrev)) == -1) {
+ 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) {
(ptr_ardata->nmem_error)++;
@@ -679,5 +674,5 @@
}
else if (title_type && !strcmp(title_type, "custabbrev1")) {
- if (((ptr_ardata->perinfo).custabbrev1 = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string_inplace(ptr_ardata->driver, &((ptr_ardata->perinfo).custabbrev1)) == -1) {
+ 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) {
(ptr_ardata->nmem_error)++;
@@ -692,5 +687,5 @@
}
else if (title_type && !strcmp(title_type, "custabbrev2")) {
- if (((ptr_ardata->perinfo).custabbrev2 = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_driver_quote_string_inplace(ptr_ardata->driver, &((ptr_ardata->perinfo).custabbrev2)) == -1) {
+ 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) {
(ptr_ardata->nmem_error)++;
Index: xmlhandler.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/xmlhandler.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -U2 -r1.20 -r1.21
--- xmlhandler.c 28 Dec 2003 23:44:22 -0000 1.20
+++ xmlhandler.c 3 Jan 2004 20:11:44 -0000 1.21
@@ -56,9 +56,4 @@
static char* get_ancestor_attr(struct elstack* ptr_current_element, char* ancestor_name, char* ancestor_attribute);
-/* libdbi changed the string quoting API after 0.7.0 */
-#ifndef HAVE_QUOTE_STRING_INPLACE
-# define dbi_driver_quote_string_inplace dbi_driver_quote_string
-#endif
-
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -1486,9 +1481,9 @@
my_refdb_startpage = my_dbi_result_get_string_copy(dbires, "refdb_startpage");
- /* the quote_string_inplace function checks for non-NULL arguments */
- dbi_driver_quote_string_inplace(driver, &my_refdb_title);
- dbi_driver_quote_string_inplace(driver, &my_refdb_volume);
- dbi_driver_quote_string_inplace(driver, &my_refdb_issue);
- dbi_driver_quote_string_inplace(driver, &my_refdb_startpage);
+ /* the quote_string function checks for non-NULL arguments */
+ dbi_driver_quote_string(driver, &my_refdb_title);
+ dbi_driver_quote_string(driver, &my_refdb_volume);
+ dbi_driver_quote_string(driver, &my_refdb_issue);
+ dbi_driver_quote_string(driver, &my_refdb_startpage);
sprintf(sql_command, "INSERT INTO %s (article_title,volume,issue,startpage,pubyear) VALUES (%s,%s,%s,%s,%d)", ptr_gbdata->ptr_table_name, (my_refdb_title) ? my_refdb_title : "\'\'", (my_refdb_volume) ? my_refdb_volume : "\'\'", (my_refdb_issue) ? my_refdb_issue : "\'\'", (my_refdb_startpage) ? my_refdb_startpage : "\'\'", dbi_result_get_short(dbires, "refdb_pubyear"));
|