refdb-cvs Mailing List for RefDB (Page 51)
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-08-12 21:13:23
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7079 Modified Files: Tag: Release_0_9_5_stable risdb.c Log Message: remove_xuser_entries(): optionally remove all entries of a dataset Index: risdb.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risdb.c,v retrieving revision 1.44.2.7 retrieving revision 1.44.2.8 diff -u -U2 -r1.44.2.7 -r1.44.2.8 --- risdb.c 10 Aug 2005 20:51:56 -0000 1.44.2.7 +++ risdb.c 12 Aug 2005 21:13:14 -0000 1.44.2.8 @@ -3183,5 +3183,6 @@ unsigned long long ref_id reference id - char* set_owner + char* set_owner name of the user who owns the dataset. If NULL, all + entries regarding the reference ID will be removed dbi_conn conn the database connection @@ -3196,5 +3197,10 @@ dbi_result dbires1; - sprintf(sql_command, "SELECT xuser_id FROM t_xuser, t_user WHERE t_user.user_name=\'%s\' AND t_xuser.user_id=t_user.user_id AND t_xuser.refdb_id="ULLSPEC, set_owner, ref_id); + if (set_owner && *set_owner) { + sprintf(sql_command, "SELECT xuser_id FROM t_xuser, t_user WHERE t_user.user_name=\'%s\' AND t_xuser.user_id=t_user.user_id AND t_xuser.refdb_id="ULLSPEC, set_owner, ref_id); + } + else { + sprintf(sql_command, "SELECT xuser_id FROM t_xuser, t_user WHERE t_xuser.refdb_id="ULLSPEC, ref_id); + } LOG_PRINT(LOG_DEBUG, sql_command); |
From: Markus H. <mho...@us...> - 2005-08-12 21:10:26
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6312 Modified Files: Tag: Release_0_9_5_stable risxhandler.h refdbdref.c Log Message: added real username to struct addrisx_data Index: risxhandler.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/risxhandler.h,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -U2 -r1.10 -r1.10.2.1 --- risxhandler.h 15 Feb 2004 23:38:30 -0000 1.10 +++ risxhandler.h 12 Aug 2005 21:10:15 -0000 1.10.2.1 @@ -29,4 +29,5 @@ char date_buffer[12]; char otherinfo[256]; + char username[16]; /* may be different from current user which is in ptr_clrequest */ struct AUTHOR_INFO* ptr_ainfo; struct RISDATA* ptr_risdata; Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.14 retrieving revision 1.65.2.15 diff -u -U2 -r1.65.2.14 -r1.65.2.15 --- refdbdref.c 29 Jul 2005 21:15:42 -0000 1.65.2.14 +++ refdbdref.c 12 Aug 2005 21:10:15 -0000 1.65.2.15 @@ -415,4 +415,6 @@ *(ardata.real_citekey) = '\0'; *(ardata.type) = '\0'; + strncpy(ardata.username, the_user, 16); + ardata.username[15] = '\0'; ardata.ptr_clrequest = ptr_clrequest; ardata.ptr_id_sentinel = ptr_sentinel; |
From: Markus H. <mho...@us...> - 2005-08-10 20:52:05
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19999 Modified Files: Tag: Release_0_9_5_stable risdb.c risdb.h Log Message: delete user data before updating a RIS reference Index: risdb.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risdb.c,v retrieving revision 1.44.2.6 retrieving revision 1.44.2.7 diff -u -U2 -r1.44.2.6 -r1.44.2.7 --- risdb.c 29 Jul 2005 21:15:43 -0000 1.44.2.6 +++ risdb.c 10 Aug 2005 20:51:56 -0000 1.44.2.7 @@ -564,4 +564,18 @@ } + /* search orphans in t_xuser */ + result = remove_xuser_entries(n_refdb_id, set_owner, conn); + if (result != 0 && result != 4) { + sprintf(sql_command, "253:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); + if ((new_msgpool = mstrcat(*ptr_msg_pool, sql_command, ptr_msg_pool_len, 0)) == NULL) { + return 0; + } + else { + *ptr_msg_pool = new_msgpool; + } + retval = 1; + goto cleanup; + } + /* search orphans in t_periodical */ sprintf(sql_command, "SELECT refdb_periodical_id FROM t_refdb WHERE refdb_id="ULLSPEC, (unsigned long long)n_refdb_id); @@ -3159,4 +3173,62 @@ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + remove_xuser_entries(): removes the xuser entry associated with + a particular dataset and a particular user + + int remove_xuser_entries returns 0 if ok, > 0 if error + error codes: 1 = select from t_xuser failed + 3 = delete from t_xuser failed + 4 = no entry found + + unsigned long long ref_id reference id + + char* set_owner + + dbi_conn conn the database connection + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +int remove_xuser_entries(unsigned long long ref_id, char* set_owner, dbi_conn conn) { + char sql_command[256]; + + unsigned long long n_xuser_id = 0; /* xid of set_owner regarding current ref */ + unsigned long long numrows; + dbi_result dbires; + dbi_result dbires1; + + sprintf(sql_command, "SELECT xuser_id FROM t_xuser, t_user WHERE t_user.user_name=\'%s\' AND t_xuser.user_id=t_user.user_id AND t_xuser.refdb_id="ULLSPEC, set_owner, ref_id); + + LOG_PRINT(LOG_DEBUG, sql_command); + dbires = dbi_conn_query(conn, sql_command); + if (!dbires) { + LOG_PRINT(LOG_WARNING, "select from t_xuser failed"); + return 1; + } + + while (dbi_result_next_row(dbires)) { + n_xuser_id = my_dbi_result_get_idval(dbires, "xuser_id"); + + /* delete entry in xuser table */ + sprintf(sql_command, "DELETE FROM t_xuser WHERE xuser_id="ULLSPEC, (unsigned long long)n_xuser_id); + LOG_PRINT(LOG_DEBUG, sql_command); + dbires1 = dbi_conn_query(conn, sql_command); + if (!dbires1) { + dbi_result_free(dbires); + LOG_PRINT(LOG_WARNING, "delete from t_xnote failed"); + return 3; + } + dbi_result_free(dbires1); + } + + dbi_result_free(dbires); + + if (n_xuser_id) { + return 0; + } + else { + return 4; + } +} + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ remove_xnote_entries(): removes xnote entries associated with a particular dataset Index: risdb.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/risdb.h,v retrieving revision 1.11.2.1 retrieving revision 1.11.2.2 diff -u -U2 -r1.11.2.1 -r1.11.2.2 --- risdb.h 15 Apr 2005 22:45:11 -0000 1.11.2.1 +++ risdb.h 10 Aug 2005 20:51:56 -0000 1.11.2.2 @@ -37,4 +37,5 @@ int remove_xnote_entries(unsigned long long xref_id, dbi_conn conn, int mode); int remove_periodical_entries(unsigned long long periodical_id, dbi_conn conn); +int remove_xuser_entries(unsigned long long ref_id, char* set_owner, dbi_conn conn); /* int update_refdb_field(const char* fieldname, unsigned long long id, const char* fieldvalue, dbi_driver dbidrv, dbi_conn conn); */ int insert_user(const char* set_owner, unsigned long long n_refdb_id, unsigned long long* ptr_n_user_id, dbi_conn conn, const char* drivername, int replace_ref, int mode); |
From: Markus H. <mho...@us...> - 2005-08-10 19:46:08
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7047 Modified Files: Tag: Release_0_9_5_stable backend-dbib.c backend-dbib.h backend-dbiba.c Log Message: fixed int vs. long long mismatches that caused errors on OSX Index: backend-dbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.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 --- backend-dbib.c 29 Jul 2005 21:15:22 -0000 1.28.2.6 +++ backend-dbib.c 10 Aug 2005 19:45:59 -0000 1.28.2.7 @@ -1100,7 +1100,7 @@ int n_intext = 0; /* 0 = bibliography, 1 = intext, 2 = intext subseq */ int n_status; - unsigned long long n_id; - unsigned long long n_refstyle_id; - unsigned long long n_separator_id; + unsigned int n_id; + unsigned int n_refstyle_id; + unsigned int n_separator_id; char *new_ref; char *ref_buffer; @@ -1150,5 +1150,5 @@ } - n_id = my_dbi_result_get_idval(dbires_cit, "ID"); + n_id = dbi_result_get_uint(dbires_cit, "ID"); if (!load_style(pubtype, n_id, ptr_bibconns->conn_refdb)) { free(sql_command); @@ -1171,5 +1171,5 @@ } - n_refstyle_id = my_dbi_result_get_idval(dbi_style_res, "ID"); + n_refstyle_id = dbi_result_get_uint(dbi_style_res, "ID"); if (dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { /* ToDo: jump out here? */ @@ -1182,8 +1182,8 @@ if (!strcmp(my_dbi_conn_get_cap(ptr_bibconns->conn_refdb, "multiple_db"), "t")) { - sprintf(sql_command, "SELECT TYPE, SEPARATORID, POS FROM %s.POSITIONS WHERE REFSTYLEID="ULLSPEC" ORDER BY POS ASC", MAIN_DB, (unsigned long long)n_refstyle_id); + sprintf(sql_command, "SELECT TYPE, SEPARATORID, POS FROM %s.POSITIONS WHERE REFSTYLEID=%u ORDER BY POS ASC", MAIN_DB, n_refstyle_id); } else { - sprintf(sql_command, "SELECT TYPE, SEPARATORID, POS FROM POSITIONS WHERE REFSTYLEID="ULLSPEC" ORDER BY POS ASC", (unsigned long long)n_refstyle_id); + sprintf(sql_command, "SELECT TYPE, SEPARATORID, POS FROM POSITIONS WHERE REFSTYLEID=%u ORDER BY POS ASC", n_refstyle_id); } @@ -1203,5 +1203,5 @@ item_type = dbi_result_get_string(dbires_pos, "TYPE"); /* n_separator_id = my_dbi_result_get_idval(dbi_style_res, "SEPARATORID"); */ - n_separator_id = my_dbi_result_get_idval(dbires_pos, "SEPARATORID"); + n_separator_id = dbi_result_get_uint(dbires_pos, "SEPARATORID"); if (!item_type || !*item_type) { Index: backend-dbib.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.h,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -u -U2 -r1.9.2.1 -r1.9.2.2 --- backend-dbib.h 15 Apr 2005 22:45:05 -0000 1.9.2.1 +++ backend-dbib.h 10 Aug 2005 19:45:59 -0000 1.9.2.2 @@ -37,5 +37,5 @@ char* format_journalname(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, const char* database, int n_intext); char* format_pages(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, int n_intext); -char* format_separator(char* ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, unsigned long long n_separator_id); +char* format_separator(char* ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, unsigned int n_separator_id); char* format_simple(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int n_intext, int n_item_index, int n_preceeding_index, int n_following_index, const char* elname); char* format_notes(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, const char* username); Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.11 retrieving revision 1.26.2.12 diff -u -U2 -r1.26.2.11 -r1.26.2.12 --- backend-dbiba.c 29 Jul 2005 21:15:23 -0000 1.26.2.11 +++ backend-dbiba.c 10 Aug 2005 19:45:59 -0000 1.26.2.12 @@ -2630,5 +2630,5 @@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -char* format_separator(char* ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, unsigned long long n_separator_id) { +char* format_separator(char* ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, unsigned int n_separator_id) { int nhave_content = 0; char *new_ref; @@ -2643,8 +2643,8 @@ if (!strcmp(my_dbi_conn_get_cap(ptr_bibconns->conn_refdb, "multiple_db"), "t")) { - sprintf(sql_command, "SELECT VALUE from %s.SEPARATORS where ID="ULLSPEC, MAIN_DB, (unsigned long long)n_separator_id); + sprintf(sql_command, "SELECT VALUE from %s.SEPARATORS where ID=%u", MAIN_DB, n_separator_id); } else { - sprintf(sql_command, "SELECT VALUE from SEPARATORS where ID="ULLSPEC, (unsigned long long)n_separator_id); + sprintf(sql_command, "SELECT VALUE from SEPARATORS where ID=%u", n_separator_id); } |
From: Markus H. <mho...@us...> - 2005-08-10 03:03:34
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14186 Modified Files: refdb-mode.el Log Message: added CK and ID commands to the getref-by-region and getnote-by-region groups of commands Index: refdb-mode.el =================================================================== RCS file: /cvsroot/refdb/elisp/refdb-mode.el,v retrieving revision 1.15 retrieving revision 1.16 diff -u -U2 -r1.15 -r1.16 --- refdb-mode.el 25 Jun 2005 21:52:53 -0000 1.15 +++ refdb-mode.el 8 Aug 2005 23:26:31 -0000 1.16 @@ -337,4 +337,6 @@ ;; refdb-getref-by-keyword-on-region ;; refdb-getref-by-periodical-on-region +;; refdb-getref-by-id-on-region +;; refdb-getref-by-citekey-on-region ;; -- ;; refdb-pickref @@ -374,4 +376,6 @@ ;; refdb-getnote-by-periodicallink-on-region ;; refdb-getnote-by-keywordlink-on-region +;; refdb-getnote-by-idlink-on-region +;; refdb-getnote-by-citekeylink-on-region ;; -- ;; refdb-addlink @@ -394,4 +398,5 @@ ;; -- ;; refdb-create-document +;; refdb-normalize-linkends ;; refdb-transform ;; refdb-transform-custom @@ -416,4 +421,7 @@ ;; refdb-listdb ;; refdb-viewstat +;; refdb-backup-database +;; refdb-restore-database +;; refdb-init-refdb ;; refdb-start-server ;; refdb-stop-server @@ -440,4 +448,7 @@ ;; ------------------------------------------------------------------- ;; +;; - run viewstat after startup to see whether the server +;; responds. Give a visual clue. +;; ;; - define keyboard shortcuts for the most used commands ;; @@ -450,10 +461,4 @@ ;; tab completion for targets and their values if applicable ;; -;; - Administrative interface for setting up RefDB in the first -;; place. Use db engine cli tools to set up refdb database -;; -;; - Add functions to back up databases using the native db -;; engine tools -;; ;; ------------------------------------------------------------------- ;;; Error Messages @@ -870,6 +875,6 @@ :group 'refdb-external-programs) -(defcustom refdb-view-program-shell "/bin/sh" - "File name of the shell used to start the output viewers." +(defcustom refdb-external-program-shell "/bin/sh" + "File name of the shell used to start external programs." :type 'string :group 'refdb-external-programs) @@ -1064,8 +1069,9 @@ (not (equal refdb-database-default "defaultdb")) ) - (progn +; (progn (setq refdb-database refdb-database-default) - (run-hooks 'refdb-select-database-hook)) +; (run-hooks 'refdb-select-database-hook)) ) + (run-hooks 'refdb-select-database-hook) (message "Setting default database...done") (setq refdb-default-database-set-flag t) @@ -1310,6 +1316,5 @@ (defun refdb-find-dbengine () "Set variables according to the database engine running" - (let ((dbengine - (substring + (let* ((dbstring (with-output-to-string (with-current-buffer @@ -1322,8 +1327,15 @@ refdb-database ) - ))) - ;; -1 removes the last char which is a newline - 17 -1)) - ) + )))) + (dbengine + (if (and + dbstring + (> (length dbstring) 0)) + (substring + dbstring + ;; -1 removes the last char which is a newline + 17 -1) + nil) + )) (message "Adapt to database engine %s" dbengine) (cond ((or @@ -1339,4 +1351,8 @@ (setq refdb-regexp-query-string "%%") (setq refdb-periodical-regexp "_%%"))) + (t + (progn + (setq refdb-regexp-query-string "") + (setq refdb-periodical-regexp ""))) ) ) @@ -1556,4 +1572,18 @@ ) +(defvar refdb-getref-by-id-on-region-menu-item + ["ID" + (refdb-getref-by-id-on-region) + t] + "RefDB getref-by-id menu item." + ) + +(defvar refdb-getref-by-citekey-on-region-menu-item + ["Citation Key" + (refdb-getref-by-citekey-on-region) + t] + "RefDB getref-by-citekey menu item." + ) + (defvar refdb-pickref-menu-item ["Pick references" @@ -1752,4 +1782,18 @@ ) +(defvar refdb-getnote-by-idlink-on-region-menu-item + ["Linked to ID" + (refdb-getnote-by-idlink-on-region) + t] + "RefDB getnote-by-idlink-on-region menu item." + ) + +(defvar refdb-getnote-by-citekeylink-on-region-menu-item + ["Linked to Citation Key" + (refdb-getnote-by-citekeylink-on-region) + t] + "RefDB getnote-by-citekeylink-on-region menu item." + ) + (defvar refdb-addlink-menu-item ["Add Links" @@ -2138,4 +2182,19 @@ ) +(defvar refdb-init-refdb-menu-item + ["Initialize System Database" (refdb-init-refdb) t] + "RefDB initialize refdb menu item." + ) + +(defvar refdb-backup-database-menu-item + ["Backup reference databases" (refdb-backup-database) t] + "RefDB backup refdb menu item." + ) + +(defvar refdb-restore-database-menu-item + ["Restore reference databases" (refdb-restore-database) t] + "RefDB restore refdb menu item." + ) + (defvar refdb-startd-menu-item ["Start application server on localhost" (refdb-start-server) t] @@ -2882,4 +2941,18 @@ ) +(defun refdb-getref-by-id-on-region () + "Display all RefDB datasets matching ID in region." + (refdb-message-getting-refs 'id "=" "REGION") + (refdb-getref-by-field-on-region "ID") + (refdb-message-getting-refs-done 'id "=" "REGION") + ) + +(defun refdb-getref-by-citekey-on-region () + "Display all RefDB datasets matching CITEKEY in region." + (refdb-message-getting-refs 'citekey "=" "REGION") + (refdb-getref-by-field-on-region "CK") + (refdb-message-getting-refs-done 'citekey "=" "REGION") + ) + (defun refdb-pickref (idlist) "Add references to your personal reference list." @@ -3624,4 +3697,20 @@ ) +(defun refdb-getnote-by-idlink-on-region () + "Display all RefDB notes linked to IDs matching REGION." + (interactive) + (refdb-message-getting-notes 'id "=" "REGION") + (refdb-getnote-by-field-on-region "ID") + (refdb-message-getting-notes-done 'id "=" "REGION") + ) + +(defun refdb-getnote-by-citekeylink-on-region () + "Display all RefDB notes linked to citation keys matching REGION." + (interactive) + (refdb-message-getting-notes 'citekey "=" "REGION") + (refdb-getnote-by-field-on-region "CK") + (refdb-message-getting-notes-done 'citekey "=" "REGION") + ) + (defun refdb-addlink () "Add links from extended notes to database objects." @@ -3838,10 +3927,11 @@ ) - ;; first attempt to create the directory. The command makes sure to create any - ;; missing directories in the hierarchy, and it will not fail if the directory - ;; already exists. Then change to that directory and run the refdbnd script - ;; with all command line options in non-interactive mode. This will create - ;; the skeleton document and a Makefile - ;; If the command succeeds, we visit the basename.short.suffix file + ;; first attempt to create the directory. The command makes + ;; sure to create any missing directories in the hierarchy, + ;; and it will not fail if the directory already exists. Then + ;; change to that directory and run the refdbnd script with + ;; all command line options in non-interactive mode. This will + ;; create the skeleton document and a Makefile If the command + ;; succeeds, we visit the basename.short.suffix file (if (shell-command (format @@ -3894,5 +3984,4 @@ ) (message "Transforming document to %s..." type) - ;; todo: append filename to make process name buffer-unique (start-process (concat "refdb-transform-" (buffer-name)) @@ -3925,5 +4014,4 @@ ) (message "Transforming document to %s..." type) - ;; todo: append filename to make process name buffer-unique (start-process (concat "refdb-transform-" (buffer-name)) @@ -3996,8 +4084,7 @@ ;; of the start-process command (start-process - ;; todo: append filename to make process name buffer-unique - "refdb-view-output" + (concat "refdb-view-output-" (buffer-name)) (get-buffer-create "*refdb-messages*") - refdb-view-program-shell + refdb-external-program-shell "-c" (format "%s %s %s" @@ -4074,5 +4161,4 @@ (goto-char (point-min))) (while (re-search-forward "^ID - \\(.*\\)$" region-extended-end t) -; (message "match:%s" (match-string 1 nil)) (if (eq refdb-citation-type 'short) (setq id-string (concat id-string ";" (match-string 1 nil))) @@ -4085,4 +4171,5 @@ ) ;; remove leading semicolon in short type strings + ;; add multixref element in full type strings (cond ((and (eq refdb-citation-type 'short) @@ -4128,7 +4215,7 @@ (goto-char (point-min))) (while (re-search-forward "citekey=\"\\([^\"]*\\)\"" region-extended-end t) -; (message "match:%s" (match-string 1 nil)) (setq id-string (concat id-string ";" (match-string 1 nil)))) - ;; remove leading semicolon + ;; remove leading semicolon in short type strings + ;; add multixref element in full type strings (cond ((and (eq refdb-citation-type 'short) @@ -4243,4 +4330,8 @@ (replace-match "S" nil t nil 2))) (setq id-list (append (list (match-string 1 nil)) id-list)) + (cond ((equal (match-string 2 nil) "Q") + (replace-match "A" nil t nil 2)) + ((equal (match-string 2 nil) "S") + (replace-match "X" nil t nil 2))) ) ) @@ -4939,9 +5030,12 @@ (refdb-scan-database-list) (refdb-scan-admin-database-list) + (refdb-scan-styles-list) + (refdb-find-dbengine) + (run-hooks 'refdb-select-database-hook) (refdb-output-mode) ))) (progn ;; if it fails w/o password, ask for the password and try again - (let ((sudo-password (read-string "Your sudo password: "))) + (let ((sudo-password (read-passwd "Your sudo password: "))) (if (eq (shell-command (format @@ -4964,4 +5058,6 @@ (refdb-scan-admin-database-list) (refdb-scan-styles-list) + (refdb-find-dbengine) + (run-hooks 'refdb-select-database-hook) (refdb-output-mode) ))) @@ -5027,5 +5123,5 @@ (if (not (eq my-file nil)) (progn - (let ((sudo-password (read-string "Your sudo password: ")) + (let ((sudo-password (read-passwd "Your sudo password: ")) (my-proc (start-process "my-proc" @@ -5089,4 +5185,624 @@ ) +(defun refdb-init-refdb () + "Create the system database. Use this command once to initialize +your RefDB installation. It will destructively replace any existing +RefDB system database." + (interactive) +;; read refdbdrc config file with sudo, find defs of refdblib, dbserver etc +;; then run db cli tool to create the refdb database + (let* ((sudo-password (read-passwd "Your sudo password: ")) + (refdbdrc-localpath "/usr/local/etc/refdb/refdbdrc") + (refdbdrc-path "/etc/refdb/refdbdrc") + (my-file (if (file-exists-p refdbdrc-path) + refdbdrc-path + (if (file-exists-p refdbdrc-localpath) + refdbdrc-localpath + nil))) + (main-database "refdb") + ) + (if my-file + (let ((refdbdrc-content + (with-output-to-string + (with-current-buffer + standard-output + (call-process + shell-file-name nil '(t nil) nil shell-command-switch + (format "cat %s" my-file)))))) + (if refdbdrc-content + (let* ((refdblib + (progn + (string-match + "^refdblib[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbserver + (progn + (string-match + "^dbserver[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbsport + (progn + (string-match + "^dbsport[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbshost + (progn + (string-match + "^serverip[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbpath + (progn + (string-match + "^dbpath[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbroot + (if (or (equal dbserver "mysql") + (equal dbserver "pgsql")) + (read-string "Database administrator name: "))) + (dbroot-password + (if (or (equal dbserver "mysql") + (equal dbserver "pgsql")) + (read-passwd "Database administrator password: "))) + (dbroot-opt + (cond ((and dbroot + (equal dbserver "mysql")) + (format + "-u %s" + dbroot)) + ((and dbroot + (equal dbserver "pgsql")) + (format + "-U %s" + dbroot)) + (t + ""))) + (dbroot-password-opt + (cond ((and dbroot-password + (equal dbserver "mysql")) + (format + "-p%s" + dbroot-password)) + ((and dbroot-password + (equal dbserver "pgsql")) + (format + "-U %s" + dbroot)) + (t + ""))) + (ipopt + (cond ((and dbshost + (not (equal dbshost "localhost")) + (equal dbserver "mysql")) + (format + "-h %s" + dbshost)) + ((and dbshost + (not (equal dbshost "localhost")) + (equal dbserver "pgsql")) + (format + "-h %s" + dbshost)) + (t + "") + ) + ) + (portopt + (cond ((and dbsport + (equal dbserver "mysql")) + (format + "-P %s" + dbsport)) + ((and dbsport + (equal dbserver "pgsql")) + (format + "-p %s" + dbsport)) + (t + "") + ) + ) + (db-drop-command + (cond ((equal dbserver "mysql") + (format + "%s -c \'mysql %s %s %s %s -e \"DROP DATABASE IF EXISTS %s\"\'" + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbroot-password-opt + main-database)) + ((equal dbserver "pgsql") + (format + "xterm -title \'Drop database %s\' -e %s -c \'dropdb %s %s %s %s\'" + main-database + refdb-external-program-shell + ipopt + portopt + dbroot-opt + main-database)) + ((or (equal dbserver "sqlite") + (equal dbserver "sqlite3")) + (format + "echo \"%s\"| sudo -S %s -c \'test ! -e %s/%s || rm %s/%s\'" + sudo-password + refdb-external-program-shell + dbpath + main-database + dbpath + main-database)) + )) + (db-create-command + (cond ((equal dbserver "mysql") + (format + "%s -c \'mysql %s %s %s %s -e \"CREATE DATABASE %s CHARACTER SET \'utf8\'\"\'" + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbroot-password-opt + main-database)) + ((equal dbserver "pgsql") + (format + "xterm -title \'Create database %s\' -e %s -c \'createdb %s %s %s -E UNICODE %s\'" + main-database + refdb-external-program-shell + ipopt + portopt + dbroot-opt + main-database)) + )) + (db-command + (cond ((equal dbserver "sqlite") + (format + "echo \"%s\"| sudo -S %s -c \'sqlite %s/%s< %s/sql/refdb.dump.sqlite\'" + sudo-password + refdb-external-program-shell + dbpath + main-database + refdblib)) + ((equal dbserver "sqlite3") + (format + "echo \"%s\"| sudo -S %s -c \'sqlite3 %s/%s < %s/sql/refdb.dump.sqlite\'" + sudo-password + refdb-external-program-shell + dbpath + main-database + refdblib)) + ((equal dbserver "mysql") +;; todo: detect older versions of MySQL and use the other dumpfile + (format + "%s -c \'mysql %s %s %s %s %s < %s/sql/refdb.dump.mysql41\'" + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbroot-password-opt + main-database + refdblib)) + ((equal dbserver "pgsql") + (format + "xterm -title \'Create tables in %s\' -e %s -c \'psql %s %s %s %s < %s/sql/refdb.dump.pgsql\'" + main-database + refdb-external-program-shell + ipopt + portopt + dbroot-opt + main-database + refdblib)) + ) + ) + ) + (if (eq (shell-command + db-drop-command) 0) + (if (or (equal dbserver "mysql") + (equal dbserver "pgsql")) + (if (eq (shell-command + db-create-command) 0) + (if (not (eq (shell-command + db-command) 0)) + (error "Failed to initialize RefDB") + (message "RefDB sucessfully initialized") + ) + (error "Failed to initialize RefDB") + ) + (if (not (eq (shell-command + db-command) 0)) + (error "Failed to initialize RefDB") + (message "RefDB sucessfully initialized") + ) + ) + (error "Failed to initialize RefDB") + ) + ) + ) + ) + ) + ) + ) + +(defun refdb-backup-database () + "Create backup of a reference database." + (interactive) + (let* ((refdbdrc-localpath "/usr/local/etc/refdb/refdbdrc") + (refdbdrc-path "/etc/refdb/refdbdrc") + (my-file (if (file-exists-p refdbdrc-path) + refdbdrc-path + (if (file-exists-p refdbdrc-localpath) + refdbdrc-localpath + nil))) + ) + (if my-file + (let ((refdbdrc-content + (with-output-to-string + (with-current-buffer + standard-output + (call-process + shell-file-name nil '(t nil) nil shell-command-switch + (format "cat %s" my-file)))))) + (if refdbdrc-content + (let* ((dbname (completing-read + "Backup Database: " + (refdb-make-alist-from-list refdb-current-admin-database-list) + nil t + )) + (backup-filename (read-file-name "Save backup to: ")) + (dbserver + (progn + (string-match + "^dbserver[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbsport + (progn + (string-match + "^dbsport[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbshost + (progn + (string-match + "^serverip[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbpath + (progn + (string-match + "^dbpath[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbroot + (if (or (equal dbserver "mysql") + (equal dbserver "pgsql")) + (read-string "Database administrator name: "))) + (dbroot-password + (if (or (equal dbserver "mysql") + (equal dbserver "pgsql")) + (read-passwd "Database administrator password: "))) + (dbroot-opt + (cond ((and dbroot + (equal dbserver "mysql")) + (format + "-u %s" + dbroot)) + ((and dbroot + (equal dbserver "pgsql")) + (format + "-U %s" + dbroot)) + (t + ""))) + (dbroot-password-opt + (cond ((and dbroot-password + (equal dbserver "mysql")) + (format + "-p%s" + dbroot-password)) + ((and dbroot-password + (equal dbserver "pgsql")) + (format + "-U %s" + dbroot)) + (t + ""))) + (ipopt + (cond ((and dbshost + (not (equal dbshost "localhost")) + (equal dbserver "mysql")) + (format + "-h %s" + dbshost)) + ((and dbshost + (not (equal dbshost "localhost")) + (equal dbserver "pgsql")) + (format + "-h %s" + dbshost)) + (t + "") + ) + ) + (portopt + (cond ((and dbsport + (equal dbserver "mysql")) + (format + "-P %s" + dbsport)) + ((and dbsport + (equal dbserver "pgsql")) + (format + "-p %s" + dbsport)) + (t + "") + ) + ) + (db-backup-command + (cond ((equal dbserver "mysql") + (format + "%s -c \'mysqldump --opt %s %s %s %s --databases %s > %s\'" + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbroot-password-opt + dbname + backup-filename)) + ((equal dbserver "pgsql") + (format + "xterm -title \'Backup database %s\' -e %s -c \'pg_dump %s %s %s %s>%s\'" + dbname + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbname + backup-filename)) + ((equal dbserver "sqlite") + (format + "%s -c \'echo \'.dump\'|sqlite %s/%s >%s\'" + refdb-external-program-shell + dbpath + dbname + backup-filename)) + ((equal dbserver "sqlite3") + (format + "%s -c \'echo \'.dump\'|sqlite3 %s/%s >%s\'" + refdb-external-program-shell + dbpath + dbname + backup-filename)) + )) + ) + (if (eq (shell-command + db-backup-command) 0) + (message "Backup written successfully to %s" backup-filename) + (error "Failed to create backup") + ) + ) + (error "Failed to read server configuration file") + ) + ) + (error "Failed to read server configuration file") + ) + ) + ) + +(defun refdb-restore-database () + "Restore a reference database from a backup file." + (interactive) + (let* ((sudo-password (read-passwd "Your sudo password: ")) + (refdbdrc-localpath "/usr/local/etc/refdb/refdbdrc") + (refdbdrc-path "/etc/refdb/refdbdrc") + (my-file (if (file-exists-p refdbdrc-path) + refdbdrc-path + (if (file-exists-p refdbdrc-localpath) + refdbdrc-localpath + nil))) + ) + (if my-file + (let ((refdbdrc-content + (with-output-to-string + (with-current-buffer + standard-output + (call-process + shell-file-name nil '(t nil) nil shell-command-switch + (format "cat %s" my-file)))))) + (if refdbdrc-content + (let* ((dbname (read-string "Database name: ")) + (backup-filename (read-file-name "Restore backup from: ")) + (dbserver + (progn + (string-match + "^dbserver[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbsport + (progn + (string-match + "^dbsport[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbshost + (progn + (string-match + "^serverip[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbpath + (progn + (string-match + "^dbpath[ \t]+\\(.+\\)$" + refdbdrc-content) + (match-string 1 refdbdrc-content) + )) + (dbroot + (if (or (equal dbserver "mysql") + (equal dbserver "pgsql")) + (read-string "Database administrator name: "))) + (dbroot-password + (if (or (equal dbserver "mysql") + (equal dbserver "pgsql")) + (read-passwd "Database administrator password: "))) + (dbroot-opt + (cond ((and dbroot + (equal dbserver "mysql")) + (format + "-u %s" + dbroot)) + ((and dbroot + (equal dbserver "pgsql")) + (format + "-U %s" + dbroot)) + (t + ""))) + (dbroot-password-opt + (cond ((and dbroot-password + (equal dbserver "mysql")) + (format + "-p%s" + dbroot-password)) + ((and dbroot-password + (equal dbserver "pgsql")) + (format + "-U %s" + dbroot)) + (t + ""))) + (ipopt + (cond ((and dbshost + (not (equal dbshost "localhost")) + (equal dbserver "mysql")) + (format + "-h %s" + dbshost)) + ((and dbshost + (not (equal dbshost "localhost")) + (equal dbserver "pgsql")) + (format + "-h %s" + dbshost)) + (t + "") + ) + ) + (portopt + (cond ((and dbsport + (equal dbserver "mysql")) + (format + "-P %s" + dbsport)) + ((and dbsport + (equal dbserver "pgsql")) + (format + "-p %s" + dbsport)) + (t + "") + ) + ) + (db-drop-command + (cond ((equal dbserver "mysql") + (format + "%s -c \'mysql %s %s %s %s -e \"DROP DATABASE IF EXISTS %s\"\'" + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbroot-password-opt + dbname)) + ((equal dbserver "pgsql") + (format + "xterm -title \'Drop database %s\' -e %s -c \'dropdb %s %s %s %s\'" + dbname + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbname)) + ((or (equal dbserver "sqlite") + (equal dbserver "sqlite3")) + (format + "echo \"%s\"| sudo -S %s -c \'test ! -e %s/%s || rm %s/%s\'" + sudo-password + refdb-external-program-shell + dbpath + main-database + dbpath + dbname)) + )) + (db-restore-command + (cond ((equal dbserver "mysql") + (format + "%s -c \'mysql %s %s %s %s %s <%s\'" + refdb-external-program-shell + ipopt + portopt + dbroot-opt + dbroot-password-opt + dbname + backup-filename)) + ((equal dbserver "pgsql") + (format + "xterm -title \'Restore database %s\' -e %s -c \'psql %s %s %s %s<%s\'" + dbname + refdb-external-program-shell + ipopt + portopt + dbroot + dbname + backup-filename)) + ((equal dbserver "sqlite") + (format + "%s -c \'sqlite %s < %s/%s\'" + refdb-external-program-shell + dbname + dbpath + backup-filename)) + ((equal dbserver "sqlite3") + (format + "%s -c \'sqlite3 %s <%s/%s\'" + refdb-external-program-shell + dbname + dbpath + backup-filename)) + )) + ) + (if (eq (shell-command + db-drop-command) 0) + (if (eq (shell-command + db-restore-command) 0) + (message "Backup restored successfully from %s" backup-filename) + (error "Failed to restore backup") + ) + (error "Failed to drop existing database") + ) + ) + (error "Failed to read server configuration file") + ) + ) + (error "Failed to read server configuration file") + ) + ) + ) + + ;; ******************************************************************* ;;; bibutils support functions @@ -5565,4 +6281,6 @@ refdb-getref-by-keyword-on-region-menu-item refdb-getref-by-periodical-on-region-menu-item + refdb-getref-by-id-on-region-menu-item + refdb-getref-by-citekey-on-region-menu-item ) "*Contents of 'Get References on Region' submenu for RefDB mode. @@ -5623,4 +6341,6 @@ refdb-getnote-by-keywordlink-on-region-menu-item refdb-getnote-by-periodicallink-on-region-menu-item + refdb-getnote-by-idlink-on-region-menu-item + refdb-getnote-by-citekeylink-on-region-menu-item ) "*Contents of 'Get Notes on Region' submenu for RefDB mode. @@ -5688,4 +6408,8 @@ refdb-viewstat-menu-item refdb-menu-item-separator4 + refdb-backup-database-menu-item + refdb-restore-database-menu-item + refdb-menu-item-separator4 + refdb-init-refdb-menu-item refdb-customize-menu-item refdb-customize-submenu-definition |
From: Markus H. <mho...@us...> - 2005-08-08 00:09:29
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20155/src Modified Files: Tag: Release_0_9_5_stable backend-db31.c Log Message: author and corpauthor elements now use role attribute if available Index: backend-db31.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-db31.c,v retrieving revision 1.16.2.4 retrieving revision 1.16.2.5 diff -u -U2 -r1.16.2.4 -r1.16.2.5 --- backend-db31.c 6 Aug 2005 23:11:01 -0000 1.16.2.4 +++ backend-db31.c 8 Aug 2005 00:09:20 -0000 1.16.2.5 @@ -1324,5 +1324,12 @@ if (!*(ptr_ainfo->lastname) && !*(ptr_ainfo->firstname) && !*(ptr_ainfo->middlename) && !*(ptr_ainfo->suffix)) { - strcat(authorstring, "<corpauthor>"); + if (*(ptr_ainfo->role)) { + strcat(authorstring, "<corpauthor role=\""); + strcat(authorstring, ptr_ainfo->role); + strcat(authorstring, "\">"); + } + else { + strcat(authorstring, "<corpauthor>"); + } if ((entitize_buf = mstrdup(ptr_ainfo->name)) == NULL) { @@ -1337,5 +1344,13 @@ } else { /* have name parts */ - strcat(authorstring, "<author>"); + if (*(ptr_ainfo->role)) { + strcat(authorstring, "<author role=\""); + strcat(authorstring, ptr_ainfo->role); + strcat(authorstring, "\">"); + } + else { + strcat(authorstring, "<author>"); + } + if (*(ptr_ainfo->firstname)) { strcat(authorstring, "<firstname>"); |
From: Markus H. <mho...@us...> - 2005-08-08 00:08:42
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19964 Modified Files: Tag: Release_0_9_5_stable backend.c Log Message: request_authors(), get_author_parts(): request and return author role Index: backend.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.c,v retrieving revision 1.27.2.4 retrieving revision 1.27.2.5 diff -u -U2 -r1.27.2.4 -r1.27.2.5 --- backend.c 29 Jul 2005 21:15:34 -0000 1.27.2.4 +++ backend.c 8 Aug 2005 00:08:29 -0000 1.27.2.5 @@ -1787,5 +1787,5 @@ } - sprintf(sql_command, "SELECT %st_author.author_name,%st_author.author_lastname,%st_author.author_firstname,%st_author.author_middlename,%st_author.author_suffix FROM %st_author, %st_xauthor WHERE %st_author.author_id=%st_xauthor.author_id AND %st_xauthor.xauthor_type=%s AND %st_xauthor.refdb_id="ULLSPEC" ORDER BY t_xauthor.xauthor_position", dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, get_author_type_string(driver, type), dbstring, (unsigned long long)n_id); + sprintf(sql_command, "SELECT %st_author.author_name,%st_author.author_lastname,%st_author.author_firstname,%st_author.author_middlename,%st_author.author_suffix,%st_xauthor.xauthor_role FROM %st_author, %st_xauthor WHERE %st_author.author_id=%st_xauthor.author_id AND %st_xauthor.xauthor_type=%s AND %st_xauthor.refdb_id="ULLSPEC" ORDER BY t_xauthor.xauthor_position", dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, dbstring, get_author_type_string(driver, type), dbstring, (unsigned long long)n_id); LOG_PRINT(LOG_DEBUG, sql_command); @@ -1847,4 +1847,5 @@ ptr_ainfo->middlename[0] = '\0'; ptr_ainfo->suffix[0] = '\0'; + ptr_ainfo->role[0] = '\0'; if (dbi_result_next_row(dbires)) { @@ -1893,4 +1894,13 @@ strcpy(ptr_ainfo->suffix, result); } + + /* role */ + result = dbi_result_get_string_idx(dbires, 6); + if (dbi_conn_error_flag(dbi_result_get_conn(dbires))) { + return NULL; + } + else if (result) { + strcpy(ptr_ainfo->role, result); + } } else { |
From: Markus H. <mho...@us...> - 2005-08-06 23:11:12
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16529 Modified Files: Tag: Release_0_9_5_stable backend-db31.c Log Message: added UNPB title back Index: backend-db31.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-db31.c,v retrieving revision 1.16.2.3 retrieving revision 1.16.2.4 diff -u -U2 -r1.16.2.3 -r1.16.2.4 --- backend-db31.c 29 Jul 2005 21:15:21 -0000 1.16.2.3 +++ backend-db31.c 6 Aug 2005 23:11:01 -0000 1.16.2.4 @@ -590,5 +590,5 @@ /* book title or primary title */ item = NULL; - if (!strcmp(type, "BOOK") || !strcmp(type, "UNPB") + if (!strcmp(type, "BOOK")/* || !strcmp(type, "UNPB") */ || !strcmp(type, "CHAP") || !strcmp(type, "CONF") || !strcmp(type, "GEN")) { @@ -596,5 +596,5 @@ } else if (strcmp(type, "JFULL") && strcmp(type, "JOUR") - && strcmp(type, "MGZN") &strcmp(type, "NEWS") + && strcmp(type, "MGZN") && strcmp(type, "NEWS") && strcmp(type, "GEN")) { item = get_refdb_title_copy(ptr_rendinfo->dbires); |
From: Markus H. <mho...@us...> - 2005-08-06 22:52:23
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14237 Modified Files: Tag: Release_0_9_5_stable backend-risx.c Log Message: give back title to UNPB entries Index: backend-risx.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-risx.c,v retrieving revision 1.30.2.7 retrieving revision 1.30.2.8 diff -u -U2 -r1.30.2.7 -r1.30.2.8 --- backend-risx.c 29 Jul 2005 21:15:24 -0000 1.30.2.7 +++ backend-risx.c 6 Aug 2005 22:52:12 -0000 1.30.2.8 @@ -298,5 +298,5 @@ if (!strcmp(type, "BOOK") - || !strcmp(type, "UNPB") +/* || !strcmp(type, "UNPB") */ || !strcmp(type, "CHAP") || !strcmp(type, "GEN") |
From: Markus H. <mho...@us...> - 2005-08-06 22:44:19
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13305 Modified Files: Tag: Release_0_9_5_stable pref.c Log Message: fixed buffer overrun in read_prefs, bug id 1252586 Index: pref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/pref.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 --- pref.c 29 Jul 2005 21:15:35 -0000 1.15.2.1 +++ pref.c 6 Aug 2005 22:44:09 -0000 1.15.2.2 @@ -76,5 +76,5 @@ char *refdblib; /* value of the REFDBLIB environment variable */ char default_refdblib[_POSIX_PATH_MAX+1] = SYSCONFDIR; /* usually /etc */ - char theinitfile[_POSIX_NAME_MAX+1]; + char theinitfile[_POSIX_PATH_MAX+1]; char have_global = 0; @@ -86,7 +86,5 @@ /* first try to read the global file */ - strcpy(theinitfile, refdblib); - strcat(theinitfile, "/"); - strcat(theinitfile, init_file); + snprintf(theinitfile, _POSIX_PATH_MAX, "%s/%s", refdblib, init_file); fp = fopen(theinitfile, "r"); if (fp != NULL) { @@ -104,7 +102,5 @@ refdblib = getenv("REFDBLIB"); if (refdblib != NULL) { - strcpy(theinitfile, refdblib); - strcat(theinitfile, "/"); - strcat(theinitfile, init_file); + snprintf(theinitfile, _POSIX_PATH_MAX, "%s/%s", refdblib, init_file); fp = fopen(theinitfile, "r"); if (fp != NULL) { @@ -134,12 +130,8 @@ } else { - strcpy(theinitfile, home); - strcat(theinitfile, "/."); /* first look for a hidden file */ - strcat(theinitfile, init_file); + snprintf(theinitfile, _POSIX_PATH_MAX, "%s/.%s", home, init_file); fp = fopen(theinitfile, "r"); if (fp == NULL) { /* if not present, try a non-hidden rc file */ - strcpy(theinitfile, home); - strcat(theinitfile, "/"); - strcat(theinitfile, init_file); + snprintf(theinitfile, _POSIX_PATH_MAX, "%s/%s", home, init_file); fp = fopen(theinitfile, "r"); if (fp == NULL) { /* if not present in HOME, we're done */ |
From: Markus H. <mho...@us...> - 2005-07-29 21:22:57
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv949/scripts Modified Files: Tag: Release_0_9_5_stable refdb.dump.mysql.in Log Message: fixed separator type Index: refdb.dump.mysql.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/Attic/refdb.dump.mysql.in,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -U2 -r1.1.2.1 -r1.1.2.2 --- refdb.dump.mysql.in 10 Feb 2005 20:29:59 -0000 1.1.2.1 +++ refdb.dump.mysql.in 29 Jul 2005 21:22:49 -0000 1.1.2.2 @@ -376,5 +376,5 @@ ID int(11) NOT NULL auto_increment, STYLEID int(11), - VALUE varchar(255), + VALUE tinytext, PRIMARY KEY (ID) ); |
From: Markus H. <mho...@us...> - 2005-07-29 21:21:59
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv748/scripts Modified Files: Tag: Release_0_9_5_stable refdbnd.in Log Message: added usage comments;create dummy full-style document Index: refdbnd.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/refdbnd.in,v retrieving revision 1.8.2.4 retrieving revision 1.8.2.5 diff -u -U2 -r1.8.2.4 -r1.8.2.5 --- refdbnd.in 22 Jun 2005 20:15:01 -0000 1.8.2.4 +++ refdbnd.in 29 Jul 2005 21:21:50 -0000 1.8.2.5 @@ -272,17 +272,21 @@ encodingstring=" encoding=\"$encoding\"" -# create an empty document +# create an empty short-style document if [ -z $xfile ]; then case "$doctype" in - db31 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; - db40 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.0//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; - db41 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; - db41x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; - db42x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; - db43x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\" \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; - teix ) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE TEI.2 PUBLIC \"-//TEI P4//DTD Main DTD Driver File//EN\" \"http://www.tei-c.org/P4X/DTD/tei2.dtd\" [\n<!ENTITY % TEI.general 'INCLUDE'>\n<!ENTITY % TEI.names.dates 'INCLUDE'>\n<!ENTITY % TEI.linking 'INCLUDE'>\n<!ENTITY % TEI.XML 'INCLUDE'>\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; + db31 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<$pubtype>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n</$pubtype>\n" > $basename.short.$extension;; + db40 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.0//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<$pubtype>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n</$pubtype>\n" > $basename.short.$extension;; + db41 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<$pubtype>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n</$pubtype>\n" > $basename.short.$extension;; + db41x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<$pubtype>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n</$pubtype>\n" > $basename.short.$extension;; + db42x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<$pubtype>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n</$pubtype>\n" > $basename.short.$extension;; + db43x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\" \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<$pubtype>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n</$pubtype>\n" > $basename.short.$extension;; + teix ) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE TEI.2 PUBLIC \"-//TEI P4//DTD Main DTD Driver File//EN\" \"http://www.tei-c.org/P4X/DTD/tei2.dtd\" [\n<!ENTITY % TEI.general 'INCLUDE'>\n<!ENTITY % TEI.names.dates 'INCLUDE'>\n<!ENTITY % TEI.linking 'INCLUDE'>\n<!ENTITY % TEI.XML 'INCLUDE'>\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<$pubtype>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n</$pubtype>\n" > $basename.short.$extension;; esac + + # create the full-style document + cp $basename.short.$extension $basename.$extension + if [ "$silent" = "f" ]; then - echo "Document $basename.short.$extension created." + echo "Documents $basename.short.$extension and $basename.$extension created." fi else |
From: Markus H. <mho...@us...> - 2005-07-29 21:20:27
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv443/scripts Modified Files: Tag: Release_0_9_5_stable refdb.dump.mysql41.in Log Message: fixed separator type Index: refdb.dump.mysql41.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/Attic/refdb.dump.mysql41.in,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -U2 -r1.1.2.1 -r1.1.2.2 --- refdb.dump.mysql41.in 10 Feb 2005 20:29:59 -0000 1.1.2.1 +++ refdb.dump.mysql41.in 29 Jul 2005 21:20:19 -0000 1.1.2.2 @@ -380,5 +380,5 @@ `ID` int(11) NOT NULL auto_increment, `STYLEID` int(11) default NULL, - `VALUE` varchar(255) default NULL, + `VALUE` tinytext default NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31146 Modified Files: Tag: Release_0_9_5_stable authorinfo.c backend-bibtex.c backend-db31.c backend-dbib.c backend-dbiba.c backend-risx.c backend-teix.c backend.c bib2ris.c client-commands.c dbfncs.c linklist.c noteshandler.c pref.c readris.c refdb-client.c refdba.c refdbc.c refdbd.c refdbda.c refdbdbib.c refdbdnote.c refdbdref.c refdbib.c refdbxp.c risdata.c risdb.c risxhandler.c tokenize.c xmlhandler.c Log Message: removed malloc casts Index: authorinfo.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/authorinfo.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -U2 -r1.4 -r1.4.2.1 --- authorinfo.c 6 Jan 2004 23:06:36 -0000 1.4 +++ authorinfo.c 29 Jul 2005 21:15:18 -0000 1.4.2.1 @@ -48,5 +48,5 @@ size_t temp_author_len = 256; - if ((temp_author = (char*)malloc(temp_author_len)) == NULL) { + if ((temp_author = malloc(temp_author_len)) == NULL) { (*ptr_error)++; return NULL; @@ -211,5 +211,5 @@ struct AUTHOR_INFO* ptr_ainfo; - ptr_ainfo = (struct AUTHOR_INFO*)malloc(sizeof(struct AUTHOR_INFO)); + ptr_ainfo = malloc(sizeof(struct AUTHOR_INFO)); if (!ptr_ainfo) { Index: backend-bibtex.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-bibtex.c,v retrieving revision 1.16.2.3 retrieving revision 1.16.2.4 diff -u -U2 -r1.16.2.3 -r1.16.2.4 --- backend-bibtex.c 26 Jul 2005 20:21:43 -0000 1.16.2.3 +++ backend-bibtex.c 29 Jul 2005 21:15:19 -0000 1.16.2.4 @@ -144,5 +144,5 @@ if (ptr_rendinfo->nuse_citestyle) { sql_command_len = 512; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (!sql_command) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -816,5 +816,5 @@ n_bufsize = (size_t)atoi(ptr_clrequest->argument); - id_list = (char*)malloc(n_bufsize); + id_list = malloc(n_bufsize); if (id_list == NULL || insert_lilimem(&sentinel, (void**)&id_list, NULL)) { delete_all_lilimem(&sentinel); @@ -824,5 +824,5 @@ } - sql_command = (char*)malloc(nsql_command_len); + sql_command = malloc(nsql_command_len); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { delete_all_lilimem(&sentinel); @@ -833,5 +833,5 @@ /* fill in variable elements of structure */ - buffer = (char*)malloc(buffer_len); + buffer = malloc(buffer_len); if (buffer == NULL || insert_lilimem(&sentinel, (void**)&(buffer), NULL)) { delete_all_lilimem(&sentinel); @@ -1062,5 +1062,5 @@ } - *ptr_bibauthor = (char*)malloc(nauthor_len+11); + *ptr_bibauthor = malloc(nauthor_len+11); if (*ptr_bibauthor == NULL) { return NULL; Index: backend-db31.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-db31.c,v retrieving revision 1.16.2.2 retrieving revision 1.16.2.3 diff -u -U2 -r1.16.2.2 -r1.16.2.3 --- backend-db31.c 17 Apr 2005 00:09:06 -0000 1.16.2.2 +++ backend-db31.c 29 Jul 2005 21:15:21 -0000 1.16.2.3 @@ -135,5 +135,5 @@ chunk_buf_len = 1024; - if ((chunk_buf = (char*)malloc(chunk_buf_len)) == NULL) { + if ((chunk_buf = malloc(chunk_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return 801; @@ -300,5 +300,5 @@ author_buf_len = 1024; - if ((author_buf = (char*)malloc(author_buf_len)) == NULL) { + if ((author_buf = malloc(author_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return NULL; @@ -444,5 +444,5 @@ author_buf_len = 1024; - if ((author_buf = (char*)malloc(author_buf_len)) == NULL) { + if ((author_buf = malloc(author_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return NULL; @@ -974,5 +974,5 @@ author_buf_len = 1024; - if ((author_buf = (char*)malloc(author_buf_len)) == NULL) { + if ((author_buf = malloc(author_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return NULL; @@ -1447,5 +1447,5 @@ /* get buffer to assemble the docbook author output */ - dbauthor = (char*)malloc((size_t)2048); /* fixed length ok afaik */ + dbauthor = malloc((size_t)2048); /* fixed length ok afaik */ if (dbauthor == NULL) { Index: backend-dbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.c,v retrieving revision 1.28.2.5 retrieving revision 1.28.2.6 diff -u -U2 -r1.28.2.5 -r1.28.2.6 --- backend-dbib.c 26 Jul 2005 20:21:43 -0000 1.28.2.5 +++ backend-dbib.c 29 Jul 2005 21:15:22 -0000 1.28.2.6 @@ -88,5 +88,5 @@ } - sql_command = (char*)malloc(60+strlen(myjournal)); + sql_command = malloc(60+strlen(myjournal)); if (!sql_command) { @@ -249,5 +249,5 @@ sql_command_len = 4096; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (!sql_command || insert_lilimem(&sentinel, (void**)&sql_command, "sql_command")) { return 801; @@ -857,5 +857,5 @@ /* get memory for sql command buffer */ sql_command_len = 1024; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (!sql_command || insert_lilimem(&sentinel, (void**)&sql_command, "sql_command")) { return 801; @@ -1117,5 +1117,5 @@ /* get memory for sql command buffer */ - sql_command = (char*)malloc(8192); + sql_command = malloc(8192); if (!sql_command) { return 801; @@ -1124,5 +1124,5 @@ /* get memory for the buffer */ nref_buffer_len = 1024; - ref_buffer = (char*)malloc(nref_buffer_len); + ref_buffer = malloc(nref_buffer_len); if (!ref_buffer) { free(sql_command); Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.10 retrieving revision 1.26.2.11 diff -u -U2 -r1.26.2.10 -r1.26.2.11 --- backend-dbiba.c 26 Jul 2005 20:21:43 -0000 1.26.2.10 +++ backend-dbiba.c 29 Jul 2005 21:15:23 -0000 1.26.2.11 @@ -1883,5 +1883,5 @@ /* do some formatting */ - mod_periodical = (char*)malloc(strlen(periodical)+2); /* extra spaces */ + mod_periodical = malloc(strlen(periodical)+2); /* extra spaces */ if (!mod_periodical) { LOG_PRINT(LOG_WARNING, outomem.text); Index: backend-risx.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-risx.c,v retrieving revision 1.30.2.6 retrieving revision 1.30.2.7 diff -u -U2 -r1.30.2.6 -r1.30.2.7 --- backend-risx.c 31 May 2005 17:57:19 -0000 1.30.2.6 +++ backend-risx.c 29 Jul 2005 21:15:24 -0000 1.30.2.7 @@ -183,5 +183,5 @@ /* get some memory for the part/publication/set stuff */ buffer_len = 4096; - if ((buffer = (char*)malloc(buffer_len)) == NULL) { + if ((buffer = malloc(buffer_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return 801; @@ -742,5 +742,5 @@ /* get some memory for the pubinfo stuff */ buffer1_len = 4096; - if ((buffer1 = (char*)malloc(buffer1_len)) == NULL) { + if ((buffer1 = malloc(buffer1_len)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); return NULL; @@ -996,5 +996,5 @@ /* get some memory for the pubinfo stuff */ buffer1_len = 4096; - if ((buffer1 = (char*)malloc(buffer1_len)) == NULL) { + if ((buffer1 = malloc(buffer1_len)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); return NULL; Index: backend-teix.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-teix.c,v retrieving revision 1.7.2.2 retrieving revision 1.7.2.3 diff -u -U2 -r1.7.2.2 -r1.7.2.3 --- backend-teix.c 17 Apr 2005 00:09:08 -0000 1.7.2.2 +++ backend-teix.c 29 Jul 2005 21:15:34 -0000 1.7.2.3 @@ -120,5 +120,5 @@ chunk_buf_len = 1024; - if ((chunk_buf = (char*)malloc(chunk_buf_len)) == NULL) { + if ((chunk_buf = malloc(chunk_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return 801; @@ -269,5 +269,5 @@ author_buf_len = 1024; - if ((author_buf = (char*)malloc(author_buf_len)) == NULL) { + if ((author_buf = malloc(author_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return NULL; @@ -412,5 +412,5 @@ author_buf_len = 1024; - if ((author_buf = (char*)malloc(author_buf_len)) == NULL) { + if ((author_buf = malloc(author_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return NULL; @@ -909,5 +909,5 @@ author_buf_len = 1024; - if ((author_buf = (char*)malloc(author_buf_len)) == NULL) { + if ((author_buf = malloc(author_buf_len)) == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); return NULL; @@ -1050,5 +1050,5 @@ /* get buffer to assemble the docbook author output */ - authorstring = (char*)malloc((size_t)2048); /* fixed length ok afaik */ + authorstring = malloc((size_t)2048); /* fixed length ok afaik */ if (authorstring == NULL) { Index: backend.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.c,v retrieving revision 1.27.2.3 retrieving revision 1.27.2.4 diff -u -U2 -r1.27.2.3 -r1.27.2.4 --- backend.c 26 Jul 2005 20:21:44 -0000 1.27.2.3 +++ backend.c 29 Jul 2005 21:15:34 -0000 1.27.2.4 @@ -60,5 +60,5 @@ size_t header_len = 1024; - if ((header = (char*)malloc(header_len)) == NULL) { + if ((header = malloc(header_len)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); return NULL; @@ -331,5 +331,5 @@ drivername = dbi_driver_get_name(driver); - sql_command = (char*)malloc(2048); + sql_command = malloc(2048); if (sql_command == NULL) { @@ -337,5 +337,5 @@ } - sql_chunk = (char*)malloc(2048); + sql_chunk = malloc(2048); if (sql_chunk == NULL) { @@ -600,5 +600,5 @@ dbi_result dbires; - sql_command = (char*)malloc(512); + sql_command = malloc(512); if (sql_command == NULL) { @@ -1342,5 +1342,5 @@ } - sql_command = (char*)malloc(256); + sql_command = malloc(256); if (sql_command == NULL) { @@ -1411,5 +1411,5 @@ dbi_result dbires1; - sql_command = (char*)malloc(256); + sql_command = malloc(256); if (sql_command == NULL) { @@ -1577,5 +1577,5 @@ drivername = dbi_driver_get_name(dbi_conn_get_driver(conn)); - sql_command = (char*)malloc(1024); + sql_command = malloc(1024); if (sql_command == NULL) { @@ -1591,5 +1591,5 @@ /* never use db argument with pgsql driver */ if (db && *db && !strcmp(my_dbi_conn_get_cap(conn, "multiple_db"), "t")) { - dbstring = (char*)malloc(strlen(db)+2); + dbstring = malloc(strlen(db)+2); if (dbstring == NULL) { @@ -1601,5 +1601,5 @@ else { /* this is weird but simplifies the free() calls further down */ - dbstring = (char*)malloc(1); + dbstring = malloc(1); if (dbstring == NULL) { @@ -1762,5 +1762,5 @@ drivername = dbi_driver_get_name(driver); - sql_command = (char*)malloc(1024); + sql_command = malloc(1024); if (sql_command == NULL) { @@ -1770,5 +1770,5 @@ /* never use db argument with pgsql */ if (db && *db && !strcmp(my_dbi_conn_get_cap(conn, "multiple_db"), "t")) { - dbstring = (char*)malloc(strlen(db)+2); + dbstring = malloc(strlen(db)+2); if (dbstring == NULL) { @@ -1779,5 +1779,5 @@ else { /* this is weird but simplifies the free() calls further down */ - dbstring = (char*)malloc(1); + dbstring = malloc(1); if (dbstring == NULL) { @@ -1919,5 +1919,5 @@ dbi_result dbires; - sql_command = (char*)malloc(512); + sql_command = malloc(512); if (sql_command == NULL) { @@ -1991,5 +1991,5 @@ drivername = dbi_driver_get_name(driver); - sql_command = (char*)malloc(1024); + sql_command = malloc(1024); if (sql_command == NULL) { @@ -1999,5 +1999,5 @@ /* never use db argument with pgsql */ if (db && *db && !strcmp(my_dbi_conn_get_cap(conn, "multiple_db"), "t")) { - dbstring = (char*)malloc(strlen(db)+2); + dbstring = malloc(strlen(db)+2); if (dbstring == NULL) { @@ -2008,5 +2008,5 @@ else { /* this is weird but simplifies the free() calls further down */ - dbstring = (char*)malloc(1); + dbstring = malloc(1); if (dbstring == NULL) { @@ -2102,5 +2102,5 @@ /* need one extra byte for a terminating \0 */ - myresult = (char*)malloc(n_stringsize+1); + myresult = malloc(n_stringsize+1); if (myresult == NULL) { return NULL; @@ -2160,5 +2160,5 @@ /* need one extra byte for a terminating \0 */ - myresult = (char*)malloc(n_stringsize+1); + myresult = malloc(n_stringsize+1); if (myresult == NULL) { return NULL; @@ -2224,5 +2224,5 @@ /* need one extra byte for a terminating \0 */ - myresult = (char*)malloc(n_stringsize+1); + myresult = malloc(n_stringsize+1); if (myresult == NULL) { LOG_PRINT(LOG_WARNING, "out of memory"); @@ -2376,5 +2376,5 @@ dbi_conn conn; - sql_command = (char*)malloc(256); + sql_command = malloc(256); if (sql_command == NULL) { @@ -2444,5 +2444,5 @@ /* get memory for sql command buffer */ - sql_command = (char*)malloc(8192); + sql_command = malloc(8192); if (!sql_command) { LOG_PRINT(LOG_WARNING, "out of memory"); Index: bib2ris.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/bib2ris.c,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -u -U2 -r1.13.2.1 -r1.13.2.2 --- bib2ris.c 7 Jan 2005 13:26:06 -0000 1.13.2.1 +++ bib2ris.c 29 Jul 2005 21:15:34 -0000 1.13.2.2 @@ -348,5 +348,5 @@ n_content_length = atoi(content_length); - cgi_data = (char*)malloc(n_content_length + 1); + cgi_data = malloc(n_content_length + 1); if (!cgi_data) { cgi_header(CGI_PLAIN); @@ -582,5 +582,5 @@ } else if (!strcmp(value_text, "annote")) { - notes.annote = (char*)malloc(strlen(field_text)+1); + notes.annote = malloc(strlen(field_text)+1); if (notes.annote == NULL) { n_error = 1; @@ -595,5 +595,5 @@ else if (!strcmp(value_text, "booktitle")) { bv_index = BV_BOOKTITLE; - titles.booktitle = (char*)malloc(strlen(field_text)+1); + titles.booktitle = malloc(strlen(field_text)+1); if (titles.booktitle == NULL) { n_error = 1; @@ -634,5 +634,5 @@ bv_index = BV_NOTE; if (notes.note == NULL) { - notes.note = (char*)malloc(strlen(field_text)+1); + notes.note = malloc(strlen(field_text)+1); if (notes.note == NULL) { n_error = 1; @@ -681,5 +681,5 @@ } else if (!strcmp(value_text, "series")) { - titles.seriestitle = (char*)malloc(strlen(field_text)+1); + titles.seriestitle = malloc(strlen(field_text)+1); if (titles.seriestitle == NULL) { n_error = 1; @@ -690,5 +690,5 @@ else if (!strcmp(value_text, "title")) { bv_index = BV_TITLE; - titles.title = (char*)malloc(strlen(field_text)+1); + titles.title = malloc(strlen(field_text)+1); if (titles.title == NULL) { n_error = 1; @@ -711,5 +711,5 @@ if (!strcmp(ptr_lb->value, "N1")) { /* append to notes */ if (notes.note == NULL) { - notes.note = (char*)malloc(strlen(field_text)+1); + notes.note = malloc(strlen(field_text)+1); if (notes.note == NULL) { n_error = 1; @@ -738,5 +738,5 @@ else if (!strcmp(ptr_lb->value, "N2")) { /* append to abstract */ if (abstract == NULL) { - abstract = (char*)malloc(strlen(field_text)+1); + abstract = malloc(strlen(field_text)+1); if (abstract == NULL) { n_error = 1; @@ -773,5 +773,5 @@ else if (!strcmp(ptr_lb->value, "AD")) { if (address == NULL) { - address = (char*)malloc(strlen(field_text)+1); + address = malloc(strlen(field_text)+1); if (address == NULL) { n_error = 1; @@ -1166,5 +1166,5 @@ char* period; char* next_start; - my_journal = (char*)malloc(strlen(journal)+1); + my_journal = malloc(strlen(journal)+1); if (my_journal == NULL) { LOG_PRINT(LOG_ERR, "out of memory"); @@ -1820,5 +1820,5 @@ /* get a buffer to hold the remaining string. We don't want to modify the original string */ - new_num = (char*)malloc(len+1); + new_num = malloc(len+1); if (new_num == NULL) { LOG_PRINT(LOG_ERR, "out of memory"); Index: client-commands.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/client-commands.c,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -u -U2 -r1.6.2.1 -r1.6.2.2 --- client-commands.c 15 Apr 2005 22:45:07 -0000 1.6.2.1 +++ client-commands.c 29 Jul 2005 21:15:34 -0000 1.6.2.2 @@ -202,5 +202,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { Index: dbfncs.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/dbfncs.c,v retrieving revision 1.15.2.11 retrieving revision 1.15.2.12 diff -u -U2 -r1.15.2.11 -r1.15.2.12 --- dbfncs.c 26 Jul 2005 20:21:45 -0000 1.15.2.11 +++ dbfncs.c 29 Jul 2005 21:15:34 -0000 1.15.2.12 @@ -50,5 +50,5 @@ struct db_caps* ptr_caps; - if ((ptr_caps = (struct db_caps*)malloc(sizeof(struct db_caps))) == NULL) { + if ((ptr_caps = malloc(sizeof(struct db_caps))) == NULL) { return NULL; } @@ -1893,5 +1893,5 @@ char* sql_command; - if ((sql_command = (char*)malloc(256)) == NULL) { + if ((sql_command = malloc(256)) == NULL) { return 1; } @@ -1953,5 +1953,5 @@ char* sql_command; - if ((sql_command = (char*)malloc(256)) == NULL) { + if ((sql_command = malloc(256)) == NULL) { return 1; } Index: linklist.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/linklist.c,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -u -U2 -r1.9.2.1 -r1.9.2.2 --- linklist.c 26 Sep 2004 21:07:05 -0000 1.9.2.1 +++ linklist.c 29 Jul 2005 21:15:34 -0000 1.9.2.2 @@ -58,5 +58,5 @@ } - ptr_new_olili = (Olili*)malloc(sizeof(Olili)); + ptr_new_olili = malloc(sizeof(Olili)); if (ptr_new_olili == NULL) { return 1; @@ -161,5 +161,5 @@ } - ptr_new_item = (Lilimem*)malloc(sizeof(Lilimem)); + ptr_new_item = malloc(sizeof(Lilimem)); if (ptr_new_item == NULL) { /* malloc failed */ @@ -291,5 +291,5 @@ } - ptr_new_item = (Liliform*)malloc(sizeof(Liliform)); + ptr_new_item = malloc(sizeof(Liliform)); if (!ptr_new_item) { /* malloc failed */ @@ -300,5 +300,5 @@ if (value && strlen(value)) { - my_value = (char*)malloc(strlen(value)+1); + my_value = malloc(strlen(value)+1); if (!my_value) { free(ptr_new_item); @@ -453,5 +453,5 @@ char* my_name; - ptr_new_item = (Lilibib*)malloc(sizeof(Lilibib)); + ptr_new_item = malloc(sizeof(Lilibib)); if (!ptr_new_item) { /* malloc failed */ @@ -460,5 +460,5 @@ if (name && *name) { - my_name = (char*)malloc(strlen(name)+1); + my_name = malloc(strlen(name)+1); if (!my_name) { free(ptr_new_item); @@ -473,5 +473,5 @@ if (value && *value) { - my_value = (char*)malloc(strlen(value)+1); + my_value = malloc(strlen(value)+1); if (!my_value) { free(ptr_new_item); @@ -594,5 +594,5 @@ Lilid* ptr_after; /* ptr to member after insertion point */ - ptr_new_item = (Lilid*)malloc(sizeof(Lilid)); + ptr_new_item = malloc(sizeof(Lilid)); if (!ptr_new_item) { /* malloc failed */ @@ -720,5 +720,5 @@ Lilistring* ptr_new_item; - ptr_new_item = (Lilistring*)malloc(sizeof(Lilistring)); + ptr_new_item = malloc(sizeof(Lilistring)); if (!ptr_new_item) { /* malloc failed */ @@ -756,5 +756,5 @@ Lilistring* ptr_last_item; - ptr_new_item = (Lilistring*)malloc(sizeof(Lilistring)); + ptr_new_item = malloc(sizeof(Lilistring)); if (!ptr_new_item) { /* malloc failed */ @@ -870,5 +870,5 @@ Lilifstring* ptr_last_item; - ptr_new_item = (Lilifstring*)malloc(sizeof(Lilifstring)); + ptr_new_item = malloc(sizeof(Lilifstring)); if (!ptr_new_item) { /* malloc failed */ Index: noteshandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/noteshandler.c,v retrieving revision 1.18.2.6 retrieving revision 1.18.2.7 diff -u -U2 -r1.18.2.6 -r1.18.2.7 --- noteshandler.c 26 Jul 2005 20:21:45 -0000 1.18.2.6 +++ noteshandler.c 29 Jul 2005 21:15:34 -0000 1.18.2.7 @@ -471,5 +471,5 @@ else if (!strcmp(el, "content")) { ptr_andata->notepool_len = ELVALUE_LENGTH; - ptr_andata->notepool = (char*)malloc(ELVALUE_LENGTH); + ptr_andata->notepool = malloc(ELVALUE_LENGTH); if (ptr_andata->notepool == NULL) { (ptr_andata->nmem_error)++; @@ -546,5 +546,5 @@ /* add current element to element stack */ - ptr_el_new = (struct elstack*)malloc(sizeof(struct elstack)); + ptr_el_new = malloc(sizeof(struct elstack)); if (ptr_el_new == NULL) { (ptr_andata->nmem_error)++; @@ -555,5 +555,5 @@ ptr_el_new->elname[63] = '\0'; /* terminate just in case */ ptr_el_new->n_elvalue_len = ELVALUE_LENGTH; - ptr_el_new->ptr_elvalue = (char*)malloc(ELVALUE_LENGTH); + ptr_el_new->ptr_elvalue = malloc(ELVALUE_LENGTH); if (ptr_el_new->ptr_elvalue == NULL) { (ptr_andata->nmem_error)++; @@ -570,5 +570,5 @@ /* printf("add attributes\n"); */ for (i = 0; ptr_attr[i]; i += 2) { - ptr_attr_new = (struct attrlist*)malloc(sizeof(struct attrlist)); + ptr_attr_new = malloc(sizeof(struct attrlist)); if (ptr_attr_new == NULL) { (ptr_andata->nmem_error)++; @@ -645,5 +645,5 @@ outlength = inlength + 1; - if ((my_elvalue = (char*)malloc(outlength)) == NULL) { + if ((my_elvalue = malloc(outlength)) == NULL) { if ((new_msgpool = mstrcat(ptr_andata->msgpool, outomem_n.text, &(ptr_andata->msgpool_len), 0)) == NULL) { return; @@ -1146,5 +1146,5 @@ /* get one byte extra for the terminating \0 */ - buffer = (char*)malloc(len+1); + buffer = malloc(len+1); if (!buffer) { @@ -1202,5 +1202,5 @@ sql_cmd_len += strlen(value); - if ((sql_command = (char*)malloc(sql_cmd_len)) == NULL) { + if ((sql_command = malloc(sql_cmd_len)) == NULL) { LOG_PRINT(LOG_WARNING, "malloc failed"); return 1; @@ -1263,5 +1263,5 @@ } - if ((sql_command = (char*)malloc(sql_cmd_len)) == NULL) { + if ((sql_command = malloc(sql_cmd_len)) == NULL) { LOG_PRINT(LOG_WARNING, "malloc failed"); return 1; @@ -1318,5 +1318,5 @@ } - if (!(sql_command = (char*)malloc(sql_cmd_len))) { + if (!(sql_command = malloc(sql_cmd_len))) { LOG_PRINT(LOG_WARNING, "malloc failed"); return 1; Index: pref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/pref.c,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -u -U2 -r1.15 -r1.15.2.1 --- pref.c 13 Dec 2002 20:34:50 -0000 1.15 +++ pref.c 29 Jul 2005 21:15:35 -0000 1.15.2.1 @@ -231,5 +231,5 @@ char emtpy_string[1] = ""; - line = (char*)malloc(NSF_LINE_LEN); + line = malloc(NSF_LINE_LEN); if (line == NULL) { return 1; Index: readris.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/readris.c,v retrieving revision 1.12.2.2 retrieving revision 1.12.2.3 diff -u -U2 -r1.12.2.2 -r1.12.2.3 --- readris.c 8 May 2005 00:59:47 -0000 1.12.2.2 +++ readris.c 29 Jul 2005 21:15:35 -0000 1.12.2.3 @@ -91,5 +91,5 @@ } - linebuffer = (char*)malloc(RIS_LINE_SIZE); + linebuffer = malloc(RIS_LINE_SIZE); if (linebuffer == NULL) { return 0; @@ -223,5 +223,5 @@ size_t buflen = 0; - linebuffer = (char*)malloc((size_t)RIS_LINE_SIZE+1); /* we append a space */ + linebuffer = malloc((size_t)RIS_LINE_SIZE+1); /* we append a space */ if (linebuffer == NULL) { @@ -294,5 +294,5 @@ int n_result; - linebuffer = (char*)malloc((size_t)RIS_LINE_SIZE+1); /* we append a space */ + linebuffer = malloc((size_t)RIS_LINE_SIZE+1); /* we append a space */ if (linebuffer == NULL) { @@ -430,5 +430,5 @@ int error = 0; - queue = (char*)malloc((size_t)FILE_CHUNK_SIZE); + queue = malloc((size_t)FILE_CHUNK_SIZE); if (queue == NULL) { return NULL; Index: refdb-client.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdb-client.c,v retrieving revision 1.31.2.1 retrieving revision 1.31.2.2 diff -u -U2 -r1.31.2.1 -r1.31.2.2 --- refdb-client.c 15 Apr 2005 22:45:08 -0000 1.31.2.1 +++ refdb-client.c 29 Jul 2005 21:15:35 -0000 1.31.2.2 @@ -264,5 +264,5 @@ /* get us some buffer for output */ - slvals.outbuffer = (char*)malloc(strlen(arg) + strlen(command) + 128); + slvals.outbuffer = malloc(strlen(arg) + strlen(command) + 128); if (slvals.outbuffer == NULL) { return 1; @@ -520,5 +520,5 @@ stringsize = strlen(s)+2; - batchstring = (char*)malloc(stringsize); + batchstring = malloc(stringsize); if (batchstring == NULL) { return NULL; @@ -598,5 +598,5 @@ n_chunksize = XMLPARSE_CHUNKSIZE; - buffer = (char*)malloc(n_chunksize); + buffer = malloc(n_chunksize); if (buffer == NULL) { return 5; Index: refdba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdba.c,v retrieving revision 1.45.2.6 retrieving revision 1.45.2.7 diff -u -U2 -r1.45.2.6 -r1.45.2.7 --- refdba.c 5 Jun 2005 00:51:18 -0000 1.45.2.6 +++ refdba.c 29 Jul 2005 21:15:35 -0000 1.45.2.7 @@ -184,5 +184,5 @@ struct sigaction act, oldact, intact, oldintact; - if ((the_command = (char*)malloc(the_command_len)) == NULL) { + if ((the_command = malloc(the_command_len)) == NULL) { fprintf(stderr, "out of memory\n"); exit (1); @@ -834,5 +834,5 @@ sentinel.varname[0] = '\0'; - outbuffer = (char*)malloc(outbuf_len); + outbuffer = malloc(outbuf_len); if (outbuffer == NULL) { delete_all_lilimem(&sentinel); @@ -859,5 +859,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -869,5 +869,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+9)); + newarg = malloc((size_t)(strlen(arg)+9)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -1329,5 +1329,5 @@ sentinel.varname[0] = '\0'; - outbuffer = (char*)malloc(outbuf_len); + outbuffer = malloc(outbuf_len); if (outbuffer == NULL) { delete_all_lilimem(&sentinel); @@ -1354,5 +1354,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -1364,5 +1364,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+9)); + newarg = malloc((size_t)(strlen(arg)+9)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -1721,5 +1721,5 @@ - outbuffer = (char*)malloc(outbuf_len); + outbuffer = malloc(outbuf_len); if (outbuffer == NULL) { delete_all_lilimem(&sentinel); @@ -1742,5 +1742,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -1752,5 +1752,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+11)); + newarg = malloc((size_t)(strlen(arg)+11)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -1786,5 +1786,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - outpipe = (char*)malloc(strlen(optarg)+1); + outpipe = malloc(strlen(optarg)+1); if (outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -2190,5 +2190,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -2200,5 +2200,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+11)); + newarg = malloc((size_t)(strlen(arg)+11)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -2234,5 +2234,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); Index: refdbc.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbc.c,v retrieving revision 1.72.2.8 retrieving revision 1.72.2.9 diff -u -U2 -r1.72.2.8 -r1.72.2.9 --- refdbc.c 2 Jun 2005 20:55:53 -0000 1.72.2.8 +++ refdbc.c 29 Jul 2005 21:15:35 -0000 1.72.2.9 @@ -268,5 +268,5 @@ from stdin must be called with the '-f stdin' switch */ - if ((the_command = (char*)malloc(the_command_len)) == NULL) { + if ((the_command = malloc(the_command_len)) == NULL) { write_err("out of memory\n"); exit (1); @@ -586,5 +586,5 @@ n_content_length = atoi(content_length); - cgi_data = (char*)malloc(n_content_length + 1); + cgi_data = malloc(n_content_length + 1); if (!cgi_data) { cgi_header(CGI_PLAIN); @@ -594,5 +594,5 @@ } - orig_cgi_data = (char*)malloc(n_content_length + 1); + orig_cgi_data = malloc(n_content_length + 1); if (!orig_cgi_data) { cgi_header(CGI_PLAIN); @@ -917,5 +917,5 @@ /* get us some buffer for output */ outbuf_len = 128; /* something to start with */ - slvals.outbuffer = (char*)malloc(outbuf_len); + slvals.outbuffer = malloc(outbuf_len); if (slvals.outbuffer == NULL) { return 1; @@ -972,5 +972,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { delete_all_lilimem(&sentinel); @@ -984,5 +984,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+11)); + newarg = malloc((size_t)(strlen(arg)+11)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -1013,5 +1013,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -1304,5 +1304,5 @@ outbuf_len = 128; /* something to start with */ - slvals.outbuffer = (char*)malloc(outbuf_len); + slvals.outbuffer = malloc(outbuf_len); if (slvals.outbuffer == NULL) { return 1; @@ -1364,5 +1364,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { delete_all_lilimem(&sentinel); @@ -1376,5 +1376,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+9)); + newarg = malloc((size_t)(strlen(arg)+9)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -1405,5 +1405,5 @@ case 'c': /* printf("-P %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -1797,5 +1797,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -1807,5 +1807,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+8)); + newarg = malloc((size_t)(strlen(arg)+8)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -1842,5 +1842,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -2475,5 +2475,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -2485,5 +2485,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+7)); + newarg = malloc((size_t)(strlen(arg)+7)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -2570,5 +2570,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -2825,5 +2825,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -2835,5 +2835,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+8)); + newarg = malloc((size_t)(strlen(arg)+8)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -2873,5 +2873,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - outpipe = (char*)malloc(strlen(optarg)+1); + outpipe = malloc(strlen(optarg)+1); if (outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -2967,6 +2967,5 @@ switch(n_opt) { case 'c': - /* printf("-c %s\n", optarg); */ - outpipe = (char*)malloc(strlen(optarg)+1); + outpipe = malloc(strlen(optarg)+1); if (outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -3094,5 +3093,5 @@ if (!n_cgi) { /* get us some memory, will be realloc'd by read_ris_set() as needed */ - ris_set_buffer = (char*)malloc(1); + ris_set_buffer = malloc(1); if (insert_lilimem(&sentinel, (void**)&ris_set_buffer, NULL)) { send_status(n_sockfd, 112, TERM_NO); @@ -3104,5 +3103,5 @@ /* and more memory for client/server communication */ - inbuffer = (char*)malloc(COMMAND_INBUF_LEN); + inbuffer = malloc(COMMAND_INBUF_LEN); if (insert_lilimem(&sentinel, (void**)&inbuffer, NULL)) { send_status(n_sockfd, 112, TERM_NO); @@ -3112,5 +3111,5 @@ } - outbuffer = (char*)malloc(COMMAND_INBUF_LEN); + outbuffer = malloc(COMMAND_INBUF_LEN); if (insert_lilimem(&sentinel, (void**)&outbuffer, NULL)) { send_status(n_sockfd, 112, TERM_NO); @@ -3525,5 +3524,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -3535,5 +3534,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+9)); + newarg = malloc((size_t)(strlen(arg)+9)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -3572,5 +3571,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - outpipe = (char*)malloc(strlen(optarg)+1); + outpipe = malloc(strlen(optarg)+1); if (outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -3665,5 +3664,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - outpipe = (char*)malloc(strlen(optarg)+1); + outpipe = malloc(strlen(optarg)+1); if (outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -3789,5 +3788,5 @@ /* get us some memory, will be realloc'd by read_ris_set() as needed */ - ris_set_buffer = (char*)malloc(1); + ris_set_buffer = malloc(1); if (insert_lilimem(&sentinel, (void**)&ris_set_buffer, NULL)) { send_status(n_sockfd, 112, TERM_NO); @@ -3799,5 +3798,5 @@ /* and more memory for client/server communication */ - inbuffer = (char*)malloc(COMMAND_INBUF_LEN); + inbuffer = malloc(COMMAND_INBUF_LEN); if (insert_lilimem(&sentinel, (void**)&inbuffer, NULL)) { send_status(n_sockfd, 112, TERM_NO); @@ -3807,5 +3806,5 @@ } - outbuffer = (char*)malloc(COMMAND_INBUF_LEN); + outbuffer = malloc(COMMAND_INBUF_LEN); if (insert_lilimem(&sentinel, (void**)&outbuffer, NULL)) { send_status(n_sockfd, 112, TERM_NO); @@ -4131,5 +4130,5 @@ /* get us some buffer for output */ outbuf_len = 128; /* something to start with */ - slvals.outbuffer = (char*)malloc(outbuf_len); + slvals.outbuffer = malloc(outbuf_len); if (slvals.outbuffer == NULL) { return 1; @@ -4155,5 +4154,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { delete_all_lilimem(&sentinel); @@ -4167,5 +4166,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+11)); + newarg = malloc((size_t)(strlen(arg)+11)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -4195,5 +4194,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -4479,5 +4478,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -4489,5 +4488,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+9)); + newarg = malloc((size_t)(strlen(arg)+9)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -4523,5 +4522,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); @@ -5001,5 +5000,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL) { return 1; @@ -5011,5 +5010,5 @@ /* the following is a temporary hack to allow cmdln_tokenize to work */ - newarg = (char*)malloc((size_t)(strlen(arg)+8)); + newarg = malloc((size_t)(strlen(arg)+8)); if (newarg == NULL) { delete_all_lilimem(&sentinel); @@ -5045,5 +5044,5 @@ case 'c': /* printf("-c %s\n", optarg); */ - slvals.outpipe = (char*)malloc(strlen(optarg)+1); + slvals.outpipe = malloc(strlen(optarg)+1); if (slvals.outpipe == NULL) { delete_all_lilimem(&sentinel); Index: refdbd.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbd.c,v retrieving revision 1.74.2.14 retrieving revision 1.74.2.15 diff -u -U2 -r1.74.2.14 -r1.74.2.15 --- refdbd.c 29 May 2005 19:35:37 -0000 1.74.2.14 +++ refdbd.c 29 Jul 2005 21:15:41 -0000 1.74.2.15 @@ -510,5 +510,5 @@ /* get us some buffer for log messages */ - msg_buffer = (char*)malloc(MSG_BUF_SIZE); + msg_buffer = malloc(MSG_BUF_SIZE); if (msg_buffer == NULL) { LOG_PRINT(LOG_CRIT, "Out of memory"); @@ -560,5 +560,5 @@ #endif - fifo_buffer = (char*)malloc(n_pipe_buf); + fifo_buffer = malloc(n_pipe_buf); if (fifo_buffer == NULL) { free(msg_buffer); @@ -845,5 +845,5 @@ /* get us some buffer for log messages */ - child_msg_buffer = (char*)malloc(MSG_BUF_SIZE); + child_msg_buffer = malloc(MSG_BUF_SIZE); if (child_msg_buffer == NULL) { /* out of memory */ @@ -862,5 +862,5 @@ } - child_inbuffer = (char*)malloc((size_t)COMMAND_INBUF_LEN*sizeof(char)); + child_inbuffer = malloc((size_t)COMMAND_INBUF_LEN*sizeof(char)); if (child_inbuffer == NULL) { /* out of memory */ @@ -871,5 +871,5 @@ } - child_inbuffer1 = (char*)malloc((size_t)COMMAND_INBUF_LEN*sizeof(char)); + child_inbuffer1 = malloc((size_t)COMMAND_INBUF_LEN*sizeof(char)); if (child_inbuffer1 == NULL) { /* out of memory */ @@ -881,5 +881,5 @@ msg_size = MSG_BUF_SIZE; - child_returnmsg = (char*)malloc(msg_size); + child_returnmsg = malloc(msg_size); if (child_returnmsg == NULL) { /* out of memory */ @@ -956,5 +956,5 @@ ptr_child_clrequest->inargc = 0; inargcmax = 10; - ptr_child_clrequest->inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + ptr_child_clrequest->inargv = malloc((size_t)inargcmax*sizeof(char*)); if (ptr_child_clrequest->inargv == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -2090,5 +2090,5 @@ struct CLIENT_REQUEST* ptr_clrequest; - if ((ptr_clrequest = (struct CLIENT_REQUEST*)malloc(sizeof(struct CLIENT_REQUEST))) == NULL) { + if ((ptr_clrequest = malloc(sizeof(struct CLIENT_REQUEST))) == NULL) { LOG_PRINT(LOG_CRIT, outomem.text); return NULL; @@ -2143,5 +2143,5 @@ } - if ((ptr_new_clrequest = (struct CLIENT_REQUEST*)malloc(sizeof(struct CLIENT_REQUEST))) == NULL) { + if ((ptr_new_clrequest = malloc(sizeof(struct CLIENT_REQUEST))) == NULL) { LOG_PRINT(LOG_CRIT, outomem.text); return NULL; @@ -2190,5 +2190,5 @@ struct ADDRESULT* ptr_addresult; - if ((ptr_addresult = (struct ADDRESULT*)malloc(sizeof(struct ADDRESULT))) == NULL) { + if ((ptr_addresult = malloc(sizeof(struct ADDRESULT))) == NULL) { return NULL; } @@ -2235,5 +2235,5 @@ struct bibinfo* ptr_biblio_info; - if ((ptr_biblio_info = (struct bibinfo*)malloc(sizeof(struct bibinfo))) == NULL) { + if ((ptr_biblio_info = malloc(sizeof(struct bibinfo))) == NULL) { return NULL; } Index: refdbda.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbda.c,v retrieving revision 1.41.2.15 retrieving revision 1.41.2.16 diff -u -U2 -r1.41.2.15 -r1.41.2.16 --- refdbda.c 26 Jul 2005 20:21:45 -0000 1.41.2.15 +++ refdbda.c 29 Jul 2005 21:15:41 -0000 1.41.2.16 @@ -106,5 +106,5 @@ ptr_addresult->msg_len = 512; - ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len); + ptr_addresult->msg = malloc(ptr_addresult->msg_len); if (ptr_addresult->msg == NULL) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -471,5 +471,5 @@ /* get a buffer to hold output data */ - if ((outbuffer = (char*)malloc((size_t)OUTBUF_LEN)) == NULL) { + if ((outbuffer = malloc((size_t)OUTBUF_LEN)) == NULL) { /* out of memory */ LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -570,5 +570,5 @@ dbi_result dbires; - if ((ptr_addresult->msg = (char*)malloc((size_t)OUTBUF_LEN)) == NULL) { + if ((ptr_addresult->msg = malloc((size_t)OUTBUF_LEN)) == NULL) { /* out of memory */ LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -789,5 +789,5 @@ ptr_addresult->msg_len = 512; - if ((ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len)) == NULL) { + if ((ptr_addresult->msg = malloc(ptr_addresult->msg_len)) == NULL) { send_status(ptr_clrequest->fd, 801, TERM_NO); LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -978,5 +978,5 @@ char message[128]; - if ((ptr_addresult->msg = (char*)malloc(512)) == NULL) { + if ((ptr_addresult->msg = malloc(512)) == NULL) { send_status(ptr_clrequest->fd, 801, TERM_NO); LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -1057,5 +1057,5 @@ /* allocate a buffer to assemble the sql command (give some extra byte for the command and encoding strings */ - sql_command = (char*)malloc((size_t)(strlen(dbname) + 256)); + sql_command = malloc((size_t)(strlen(dbname) + 256)); if (sql_command == NULL) { /* malloc failed */ LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -1229,5 +1229,5 @@ _POSIX_PATH_MAX for the sqlite driver, but this will be more than enough for database names of other drivers */ - sql_command = (char*)malloc((size_t)_POSIX_PATH_MAX); + sql_command = malloc((size_t)_POSIX_PATH_MAX); if (sql_command == NULL) { /* malloc failed */ send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -1237,5 +1237,5 @@ ptr_addresult->msg_len = 1024; - ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len); + ptr_addresult->msg = malloc(ptr_addresult->msg_len); if (ptr_addresult->msg == NULL) { free(sql_command); @@ -1418,5 +1418,5 @@ sentinel.varname[0] = '\0'; - sql_command = (char*)malloc(1024); + sql_command = malloc(1024); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -1426,5 +1426,5 @@ inbuffer_len = (size_t)COMMAND_INBUF_LEN; - inbuffer = (char*)malloc(inbuffer_len); + inbuffer = malloc(inbuffer_len); if (inbuffer == NULL || insert_lilimem(&sentinel, (void**)&inbuffer, NULL)) { delete_all_lilimem(&sentinel); @@ -1435,5 +1435,5 @@ ptr_addresult->msg_len = 1024; - ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len); + ptr_addresult->msg = malloc(ptr_addresult->msg_len); if (ptr_addresult->msg == NULL) { delete_all_lilimem(&sentinel); @@ -1552,5 +1552,5 @@ token_size = -1; - userathost = (char*)malloc(USERNAME_LENGTH + HOSTNAME_LENGTH + 16); + userathost = malloc(USERNAME_LENGTH + HOSTNAME_LENGTH + 16); if (userathost == NULL || insert_lilimem(&sentinel, (void**)&userathost, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -1921,5 +1921,5 @@ - sql_command = (char*)malloc(1024); + sql_command = malloc(1024); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -1929,5 +1929,5 @@ inbuffer_len = (size_t)COMMAND_INBUF_LEN; - inbuffer = (char*)malloc(inbuffer_len); + inbuffer = malloc(inbuffer_len); if (inbuffer == NULL || insert_lilimem(&sentinel, (void**)&inbuffer, NULL)) { delete_all_lilimem(&sentinel); @@ -1938,5 +1938,5 @@ ptr_addresult->msg_len = 1024; - ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len); + ptr_addresult->msg = malloc(ptr_addresult->msg_len); if (ptr_addresult->msg == NULL) { delete_all_lilimem(&sentinel); @@ -2132,5 +2132,5 @@ n_sql_command_len = 256+strlen(myarg); - sql_command = (char*)malloc(n_sql_command_len); + sql_command = malloc(n_sql_command_len); if (sql_command == NULL) { send_status(ptr_clrequest->fd, 801, TERM_NO); Index: refdbdbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdbib.c,v retrieving revision 1.36.2.20 retrieving revision 1.36.2.21 diff -u -U2 -r1.36.2.20 -r1.36.2.21 --- refdbdbib.c 26 Jul 2005 20:21:46 -0000 1.36.2.20 +++ refdbdbib.c 29 Jul 2005 21:15:41 -0000 1.36.2.21 @@ -193,5 +193,5 @@ sql_command_len = 4096; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -201,5 +201,5 @@ outbuffer_len = 8092; - outbuffer = (char*)malloc(outbuffer_len); + outbuffer = malloc(outbuffer_len); if (outbuffer == NULL || insert_lilimem(&sentinel, (void**)&outbuffer, NULL)) { delete_all_lilimem(&sentinel); @@ -210,5 +210,5 @@ curr_multi_id_len = 1024; - curr_multi_id = (char*)malloc(curr_multi_id_len); + curr_multi_id = malloc(curr_multi_id_len); if (curr_multi_id == NULL || insert_lilimem(&sentinel, (void**)&curr_multi_id, NULL)) { delete_all_lilimem(&sentinel); @@ -219,5 +219,5 @@ inbuffer_len = (size_t)COMMAND_INBUF_LEN; - inbuffer = (char*)malloc(inbuffer_len); + inbuffer = malloc(inbuffer_len); if (inbuffer == NULL || insert_lilimem(&sentinel, (void**)&inbuffer, NULL)) { /* malloc failed */ delete_all_lilimem(&sentinel); @@ -880,5 +880,5 @@ orig_outlength = outlength; - if ((my_outbuffer = (char*)malloc(outlength)) == NULL) { + if ((my_outbuffer = malloc(outlength)) == NULL) { send_status(ptr_clrequest->fd, 801, TERM_NO); append_return_msg(ptr_addresult, 801, id_string, bibconns.conn); @@ -998,5 +998,5 @@ if (!ptr_addresult->msg) { - ptr_addresult->msg = (char*)malloc(256); /* something to start with */ + ptr_addresult->msg = malloc(256); /* something to start with */ if (ptr_addresult->msg) { @@ -1220,5 +1220,5 @@ sql_command_len = 1024; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (sql_command == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -1257,5 +1257,5 @@ authorlist_buffer_len = 1; - authorlist_buffer = (char*)malloc(authorlist_buffer_len); + authorlist_buffer = malloc(authorlist_buffer_len); if (authorlist_buffer == NULL) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -1567,5 +1567,5 @@ /* get some memory for a return message */ - return_msg = (char*)malloc((size_t)256); + return_msg = malloc((size_t)256); if (return_msg == NULL) { /* out of memory */ @@ -1577,5 +1577,5 @@ /* get some memory for a return message */ ptr_addresult->msg_len = 256; - ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len); + ptr_addresult->msg = malloc(ptr_addresult->msg_len); if (ptr_addresult->msg == NULL) { /* out of memory */ @@ -1710,5 +1710,5 @@ /* get some memory for a return message */ ptr_addresult->msg_len = 512; - ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len); + ptr_addresult->msg = malloc(ptr_addresult->msg_len); if (ptr_addresult->msg == NULL) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -1720,5 +1720,5 @@ /* get some memory for sql commands */ - sql_command = (char*)malloc((size_t)512); + sql_command = malloc((size_t)512); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { delete_all_lilimem(&sentinel); @@ -1945,5 +1945,5 @@ attr_sentinel.value = NULL; - if ((sql_command = (char*)malloc(1024)) == NULL + if ((sql_command = malloc(1024)) == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -2167,5 +2167,5 @@ char* new_style_set; - style_set = (char*)malloc((size_t)1); + style_set = malloc((size_t)1); if (style_set == NULL) { /* out of memory */ @@ -2442,5 +2442,5 @@ } - if ((sql_command = (char*)malloc(strlen(author_concat_q)+256)) == NULL) { + if ((sql_command = malloc(strlen(author_concat_q)+256)) == NULL) { free(author_concat_q); return -1; Index: refdbdnote.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdnote.c,v retrieving revision 1.25.2.7 retrieving revision 1.25.2.8 diff -u -U2 -r1.25.2.7 -r1.25.2.8 --- refdbdnote.c 26 Jul 2005 20:21:46 -0000 1.25.2.7 +++ refdbdnote.c 29 Jul 2005 21:15:42 -0000 1.25.2.8 @@ -114,5 +114,5 @@ /* get some memory for a return message */ - return_msg = (char*)malloc((size_t)256); + return_msg = malloc((size_t)256); if (return_msg == NULL || insert_lilimem(&sentinel, (void**)&return_msg, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -162,5 +162,5 @@ /* initialize "global" handler data */ andata.msgpool_len = 512; - andata.msgpool = (char*)malloc(andata.msgpool_len); + andata.msgpool = malloc(andata.msgpool_len); if (!andata.msgpool || insert_lilimem(&sentinel, (void**)&(andata.msgpool), NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -300,5 +300,5 @@ /* try to allocate the amount the client requested */ - id_list = (char*)malloc(n_bufsize); + id_list = malloc(n_bufsize); if (id_list == NULL || insert_lilimem(&sentinel, (void**)&id_list, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -307,5 +307,5 @@ } - ptr_addresult->msg = (char*)malloc(256); /* something to start with */ + ptr_addresult->msg = malloc(256); /* something to start with */ if (!ptr_addresult->msg) { @@ -734,5 +734,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL || insert_lilimem(&sentinel, (void**)&inargv, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -743,5 +743,5 @@ /* get buffer to assemble the SQL queries */ sql_command_len = 4096; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { @@ -755,5 +755,5 @@ /* get another buffer to assemble the SQL queries */ sql_command1_len = 4096; - sql_command1 = (char*)malloc(sql_command1_len); + sql_command1 = malloc(sql_command1_len); if (sql_command1 == NULL || insert_lilimem(&sentinel, (void**)&sql_command1, NULL)) { @@ -767,5 +767,5 @@ /* get a buffer to hold tokens */ buffer_len = 4096; - buffer = (char*)malloc(buffer_len); + buffer = malloc(buffer_len); if (buffer == NULL || insert_lilimem(&sentinel, (void**)&buffer, NULL)) { @@ -779,5 +779,5 @@ /* get a buffer to hold tokens */ stringbuf_len = 4096; - stringbuf = (char*)malloc(stringbuf_len); + stringbuf = malloc(stringbuf_len); if (stringbuf == NULL || insert_lilimem(&sentinel, (void**)&stringbuf, NULL)) { @@ -2202,5 +2202,5 @@ outlength = 6*inlength; - if ((my_sql_command = (char*)malloc(outlength)) == NULL) { + if ((my_sql_command = malloc(outlength)) == NULL) { retval = 1; tiwrite(ptr_clrequest->fd, "", TERM_YES); @@ -2384,5 +2384,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL || insert_lilimem(&sentinel, (void**)&inargv, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -2393,5 +2393,5 @@ /* get buffer to assemble the SQL queries */ sql_command_len = 4096; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { @@ -2405,5 +2405,5 @@ /* get a buffer to hold tokens */ buffer_len = 4096; - buffer = (char*)malloc(buffer_len); + buffer = malloc(buffer_len); if (buffer == NULL || insert_lilimem(&sentinel, (void**)&buffer, NULL)) { @@ -2417,5 +2417,5 @@ /* yet another buffer */ return_msg_len = 4096; - return_msg = (char*)malloc(return_msg_len); + return_msg = malloc(return_msg_len); if (return_msg == NULL || insert_lilimem(&sentinel, (void**)&return_msg, NULL)) { Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.13 retrieving revision 1.65.2.14 diff -u -U2 -r1.65.2.13 -r1.65.2.14 --- refdbdref.c 26 Jul 2005 20:21:46 -0000 1.65.2.13 +++ refdbdref.c 29 Jul 2005 21:15:42 -0000 1.65.2.14 @@ -154,5 +154,5 @@ /* get some memory for a return message */ - return_msg = (char*)malloc((size_t)512); + return_msg = malloc((size_t)512); if (return_msg == NULL) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -323,5 +323,5 @@ /* get some memory for a return message */ - return_msg = (char*)malloc((size_t)256); + return_msg = malloc((size_t)256); if (return_msg == NULL || insert_lilimem(&sentinel, (void**)&return_msg, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -396,5 +396,5 @@ /* initialize "global" handler data */ ardata.msgpool_len = 512; - ardata.msgpool = (char*)malloc(ardata.msgpool_len); + ardata.msgpool = malloc(ardata.msgpool_len); if (!ardata.msgpool || insert_lilimem(&sentinel, (void**)&(ardata.msgpool), NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -560,5 +560,5 @@ size_t msg_pool_len; - ris_set = (char*)malloc((size_t)1); + ris_set = malloc((size_t)1); if (ris_set == NULL) { /* out of memory */ @@ -569,5 +569,5 @@ msg_pool_len = 256; - msg_pool = (char*)malloc(msg_pool_len); + msg_pool = malloc(msg_pool_len); if (msg_pool == NULL) { /* out of memory */ @@ -662,5 +662,5 @@ outlength = 6*inlength; - if ((my_ris_set = (char*)malloc(outlength)) == NULL) { + if ((my_ris_set = malloc(outlength)) == NULL) { ptr_addresult->failure++; send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -900,5 +900,5 @@ Lilid *ptr_curr; - if ((sql_command = (char*)malloc(sql_cmd_len)) == NULL) { + if ((sql_command = malloc(sql_cmd_len)) == NULL) { LOG_PRINT(LOG_WARNING, outomem.text); return 1; @@ -1105,5 +1105,5 @@ /* try to allocate the amount the client requested */ - id_list = (char*)malloc(n_bufsize); + id_list = malloc(n_bufsize); if (id_list == NULL || insert_lilimem(&sentinel, (void**)&id_list, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -1112,5 +1112,5 @@ } - ptr_addresult->msg = (char*)malloc(256); /* something to start with */ + ptr_addresult->msg = malloc(256); /* something to start with */ if (!ptr_addresult->msg) { @@ -1609,5 +1609,5 @@ /* allocate memory */ sql_cmd_len = 256; - sql_command = (char*)malloc(sql_cmd_len); + sql_command = malloc(sql_cmd_len); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -1617,5 +1617,5 @@ ptr_addresult->msg_len = 512; - ptr_addresult->msg = (char*)malloc(ptr_addresult->msg_len); + ptr_addresult->msg = malloc(ptr_addresult->msg_len); if (ptr_addresult->msg == NULL) { free(sql_command); @@ -1630,5 +1630,5 @@ /* try to allocate the amount the client requested */ - id_list = (char*)malloc(n_bufsize); + id_list = malloc(n_bufsize); if (id_list == NULL || insert_lilimem(&sentinel, (void**)&id_list, NULL)) { delete_all_lilimem(&sentinel); @@ -2073,5 +2073,5 @@ inargc = 0; inargcmax = 10; - inargv = (char**)malloc((size_t)inargcmax*sizeof(char*)); + inargv = malloc((size_t)inargcmax*sizeof(char*)); if (inargv == NULL || insert_lilimem(&sentinel, (void**)&inargv, NULL)) { send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -2082,5 +2082,5 @@ /* get buffer to assemble the SQL queries */ sql_command_len = 4096; - sql_command = (char*)malloc(sql_command_len); + sql_command = malloc(sql_command_len); if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { @@ -2094,5 +2094,5 @@ /* get another buffer to assemble the SQL queries */ sql_command1_len = 4096; - sql_command1 = (char*)malloc(sql_command1_len); + sql_command1 = malloc(sql_command1_len); if (sql_command1 == NULL || insert_lilimem(&sentinel, (void**)&sql_command1, NULL)) { @@ -2106,5 +2106,5 @@ /* get a buffer to hold tokens */ buffer_len = 4096; - buffer = (char*)malloc(buffer_len); + buffer = malloc(buffer_len); if (buffer == NULL || insert_lilimem(&sentinel, (void**)&buffer, NULL)) { @@ -2118,5 +2118,5 @@ /* get a buffer to hold tokens */ stringbuf_len = 4096; - stringbuf = (char*)malloc(stringbuf_len); + stringbuf = malloc(stringbuf_len); if (stringbuf == NULL || insert_lilimem(&sentinel, (void**)&stringbuf, NULL)) { Index: refdbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbib.c,v retrieving revision 1.41.2.3 retrieving revision 1.41.2.4 diff -u -U2 -r1.41.2.3 -r1.41.2.4 --- refdbib.c 15 Apr 2005 22:45:11 -0000 1.41.2.3 +++ refdbib.c 29 Jul 2005 21:15:42 -0000 1.41.2.4 @@ -561,5 +561,5 @@ struct linger mylinger; - outbuffer = (char*)malloc(outbuf_len); + outbuffer = malloc(outbuf_len); if (outbuffer == NULL) { return 1; @@ -994,5 +994,5 @@ outbuf_len = 128; /* something to start with */ - slvals.outbuffer = (char*)malloc(outbuf_len); + slvals.outbuffer = malloc(outbuf_len); if (slvals.outbuffer == NULL) { return 1; Index: refdbxp.c ==========================================================... [truncated message content] |
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29265 Modified Files: Tag: Release_0_9_5_stable backend-bibtex.c backend-dbib.c backend-dbiba.c backend.c dbfncs.c dbfncs.h noteshandler.c noteshandler.h refdbda.c refdbdbib.c refdbdnote.c refdbdref.c risdata.c risdb.c risxhandler.c xmlhandler.c Log Message: ported to libdbi 0.8.0 API Index: backend-bibtex.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-bibtex.c,v retrieving revision 1.16.2.2 retrieving revision 1.16.2.3 diff -u -U2 -r1.16.2.2 -r1.16.2.3 --- backend-bibtex.c 17 Apr 2005 00:09:06 -0000 1.16.2.2 +++ backend-bibtex.c 26 Jul 2005 20:21:43 -0000 1.16.2.3 @@ -152,5 +152,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(driver, "ed_journal)) { + if (!dbi_conn_quote_string(bibconns.conn, "ed_journal)) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); free(sql_command); Index: backend-dbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.c,v retrieving revision 1.28.2.4 retrieving revision 1.28.2.5 diff -u -U2 -r1.28.2.4 -r1.28.2.5 --- backend-dbib.c 15 Apr 2005 22:45:05 -0000 1.28.2.4 +++ backend-dbib.c 26 Jul 2005 20:21:43 -0000 1.28.2.5 @@ -83,5 +83,5 @@ } - if (dbi_driver_quote_string(dbi_conn_get_driver(conn), &myjournal) == -1) { + if (dbi_conn_quote_string(conn, &myjournal) == 0) { free(myjournal); return 801; @@ -260,5 +260,5 @@ } - if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_bibconns->conn_refdb), &myjournal) == -1) { + if (dbi_conn_quote_string(ptr_bibconns->conn_refdb, &myjournal) == 0) { delete_all_lilimem(&sentinel); return 801; @@ -609,5 +609,5 @@ author_concat = dbi_result_get_string(dbires2, "author_concat"); - n_currpos = dbi_result_get_long(dbires2, "sorted_pos"); + n_currpos = dbi_result_get_int(dbires2, "sorted_pos"); n_pubyear = dbi_result_get_short(dbires2, "pubyear"); @@ -870,5 +870,5 @@ } - if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_bibconns->conn_refdb), &myjournal) == -1) { + if (dbi_conn_quote_string(ptr_bibconns->conn_refdb, &myjournal) == 0) { delete_all_lilimem(&sentinel); return 801; @@ -1163,5 +1163,5 @@ } else { - *ptr_ref = new_ref; +/* *ptr_ref = new_ref; */ } free(sql_command); Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.9 retrieving revision 1.26.2.10 diff -u -U2 -r1.26.2.9 -r1.26.2.10 --- backend-dbiba.c 15 Apr 2005 22:45:05 -0000 1.26.2.9 +++ backend-dbiba.c 26 Jul 2005 20:21:43 -0000 1.26.2.10 @@ -516,5 +516,5 @@ /* depending on the total number of authors we need different preceedings and followings */ num_authors = dbi_result_get_numrows(dbires_author); -/* printf("num_authors went to %d<<\n", num_authors); */ +/* fprintf(stderr, "num_authors went to %d<<\n", num_authors); */ if (num_authors > 1) { author_preceeding = my_dbi_result_get_string_copy_idx(dbires_ref, n_multiplepreceeding_index); @@ -845,5 +845,5 @@ free(item); } -/* printf("end format_authorlist():%s\n", *ref); */ +/* printf("end format_authorlist():%s\n", *ptr_ref); */ if (!nhave_content) { @@ -993,5 +993,5 @@ } -/* printf("in format_pubdate. year_unique_suffix=%s; type=%d, nis_intext=%d<<\n", year_unique_suffix, type, nis_intext); */ +/* printf("in format_pubdate. year_unique_suffix=%s; type=%d, n_intext=%d<<\n", year_unique_suffix, type, n_intext); */ /* conn = dbi_result_get_conn(dbires); */ @@ -1474,5 +1474,5 @@ } -/* printf("done with format_pubdate. ref=%s<<\n", *ref); */ +/* printf("done with format_pubdate. ptr_ref=%s<<\n", *ptr_ref); */ if (!nhave_content) { (*ptr_ref)[0] ='\0'; Index: backend.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.c,v retrieving revision 1.27.2.2 retrieving revision 1.27.2.3 diff -u -U2 -r1.27.2.2 -r1.27.2.3 --- backend.c 5 Jun 2005 00:50:43 -0000 1.27.2.2 +++ backend.c 26 Jul 2005 20:21:44 -0000 1.27.2.3 @@ -2087,5 +2087,5 @@ char* myresult; unsigned short n_field_type; - unsigned int n_stringsize; + size_t n_stringsize; n_field_type = dbi_result_get_field_type(dbires, fieldname); @@ -2099,5 +2099,5 @@ } else { - n_stringsize = dbi_result_get_field_size(dbires, fieldname); + n_stringsize = dbi_result_get_field_length(dbires, fieldname); /* need one extra byte for a terminating \0 */ @@ -2145,5 +2145,5 @@ char* myresult; unsigned short n_field_type; - unsigned int n_stringsize; + size_t n_stringsize; n_field_type = dbi_result_get_field_type_idx(dbires, idx); @@ -2157,5 +2157,5 @@ } else { - n_stringsize = dbi_result_get_field_size_idx(dbires, idx); + n_stringsize = dbi_result_get_field_length_idx(dbires, idx); /* need one extra byte for a terminating \0 */ @@ -2205,5 +2205,5 @@ implementation is necessary if dbi does *not* return the \0 */ - unsigned int n_stringsize; + size_t n_stringsize; char *myresult; const char *result; @@ -2221,5 +2221,5 @@ } - n_stringsize = dbi_result_get_field_size(Result, fieldname); + n_stringsize = dbi_result_get_field_length(Result, fieldname); /* need one extra byte for a terminating \0 */ @@ -2374,5 +2374,5 @@ unsigned long long n_id; dbi_result dbires1; - dbi_driver driver; + dbi_conn conn; sql_command = (char*)malloc(256); @@ -2382,5 +2382,5 @@ } - driver = dbi_conn_get_driver(dbi_result_get_conn(dbires)); + conn = dbi_result_get_conn(dbires); quoted_username = mstrdup(username); @@ -2389,5 +2389,5 @@ return -1; } - if (dbi_driver_quote_string(driver, "ed_username) == -1) { + if (dbi_conn_quote_string(conn, "ed_username) == 0) { free(quoted_username); free(sql_command); @@ -2397,5 +2397,5 @@ n_id = my_dbi_result_get_idval(dbires, "refdb_id"); - if (username != NULL && !dbi_conn_error_flag(dbi_result_get_conn(dbires))) { + if (username != NULL && !dbi_conn_error_flag(conn)) { sprintf(sql_command, "SELECT t_xuser.xuser_id FROM t_xuser, t_user WHERE t_xuser.user_id=t_user.user_id AND t_user.user_name=%s AND t_xuser.refdb_id="ULLSPEC, quoted_username, (unsigned long long)n_id); } Index: dbfncs.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/dbfncs.c,v retrieving revision 1.15.2.10 retrieving revision 1.15.2.11 diff -u -U2 -r1.15.2.10 -r1.15.2.11 --- dbfncs.c 28 May 2005 20:13:09 -0000 1.15.2.10 +++ dbfncs.c 26 Jul 2005 20:21:45 -0000 1.15.2.11 @@ -2119,5 +2119,5 @@ dbi_conn conn; char buffer[512]; - unsigned long the_ulong; + unsigned int the_uint; unsigned long long the_ulonglong; @@ -2127,8 +2127,8 @@ /* database server does not support long long ints, retrieve as long int instead and cast */ - the_ulong = dbi_result_get_ulong(dbires, fieldname); + the_uint = dbi_result_get_uint(dbires, fieldname); /* sprintf(buffer, "ulong: u %u<< lu %lu<< llu %llu", the_ulong, the_ulong, the_ulong); */ /* LOG_PRINT(LOG_DEBUG, buffer); */ - return (unsigned long long)the_ulong; + return (unsigned long long)the_uint; } else { @@ -2149,8 +2149,8 @@ dbi_result dbires result of a previous query - unsigned long long idx index of field to query + unsigned int idx index of field to query ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -unsigned long long my_dbi_result_get_idval_idx(dbi_result dbires, unsigned short idx) { +unsigned long long my_dbi_result_get_idval_idx(dbi_result dbires, unsigned int idx) { dbi_conn conn; @@ -2160,5 +2160,5 @@ /* database server does not support long long ints, retrieve as long int instead and cast */ - return (unsigned long long)dbi_result_get_ulong_idx(dbires, idx); + return (unsigned long long)dbi_result_get_uint_idx(dbires, idx); } else { Index: dbfncs.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/dbfncs.h,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.4 diff -u -U2 -r1.6.2.3 -r1.6.2.4 --- dbfncs.h 28 May 2005 20:13:09 -0000 1.6.2.3 +++ dbfncs.h 26 Jul 2005 20:21:45 -0000 1.6.2.4 @@ -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 short idx); +unsigned long long my_dbi_result_get_idval_idx(dbi_result dbires, unsigned int idx); int my_dbi_conn_get_versioninfo(dbi_conn conn, struct VERSIONINFO* ptr_ver); Index: noteshandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/noteshandler.c,v retrieving revision 1.18.2.5 retrieving revision 1.18.2.6 diff -u -U2 -r1.18.2.5 -r1.18.2.6 --- noteshandler.c 5 May 2005 17:21:34 -0000 1.18.2.5 +++ noteshandler.c 26 Jul 2005 20:21:45 -0000 1.18.2.6 @@ -49,6 +49,6 @@ /* forward declaration of local functions */ -static int set_notesdata_field(const char* field, const char* value, dbi_conn conn, dbi_driver driver, unsigned long long n_note_id); -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); +static int set_notesdata_field(const char* field, const char* value, dbi_conn conn, unsigned long long n_note_id); +static int set_notesdata_int_field(const char* field, unsigned long long n_value, dbi_conn conn, unsigned long long n_note_id); @@ -460,5 +460,5 @@ /* } */ - result = set_notesdata_int_field("user_id", ptr_andata->n_user_id, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = set_notesdata_int_field("user_id", ptr_andata->n_user_id, ptr_andata->conn, ptr_andata->n_note_id); if (result == 1) { @@ -704,5 +704,5 @@ result = 0; - result = set_notesdata_field("title", (ptr_andata->ptr_first)->ptr_elvalue, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = set_notesdata_field("title", (ptr_andata->ptr_first)->ptr_elvalue, ptr_andata->conn, ptr_andata->n_note_id); if (result == 1) { @@ -727,5 +727,5 @@ target = get_attr(ptr_andata->ptr_first, "target"); - result = insert_link(type, target, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = insert_link(type, target, ptr_andata->conn, ptr_andata->n_note_id); if (result == 1 /* out of memory */) { @@ -825,5 +825,5 @@ else if (!strcmp(el, "content")) { if (ptr_andata->notepool && *(ptr_andata->notepool)) { - result = set_notesdata_field("content", ptr_andata->notepool, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = set_notesdata_field("content", ptr_andata->notepool, ptr_andata->conn, ptr_andata->n_note_id); /* printf("notepool went to %s<<\n", ptr_andata->notepool); */ free(ptr_andata->notepool); @@ -831,5 +831,5 @@ } else if (ptr_andata->ptr_first->ptr_elvalue && *ptr_andata->ptr_first->ptr_elvalue) { - result = set_notesdata_field("content", ptr_andata->ptr_first->ptr_elvalue, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = set_notesdata_field("content", ptr_andata->ptr_first->ptr_elvalue, ptr_andata->conn, ptr_andata->n_note_id); } @@ -861,5 +861,5 @@ if (*(ptr_andata->content_type)) { - result = set_notesdata_field("content_type", ptr_andata->content_type, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = set_notesdata_field("content_type", ptr_andata->content_type, ptr_andata->conn, ptr_andata->n_note_id); if (result == 1) { @@ -877,5 +877,5 @@ if (*(ptr_andata->content_xmllang)) { - result = set_notesdata_field("content_xmllang", ptr_andata->content_xmllang, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = set_notesdata_field("content_xmllang", ptr_andata->content_xmllang, ptr_andata->conn, ptr_andata->n_note_id); if (result == 1) { @@ -964,5 +964,5 @@ key = get_unique_citekey(ptr_andata->conn, ptr_andata->user, atoi(ptr_andata->year), ptr_andata->n_note_id, 1 /* notes */); - if (key && set_notesdata_field("key", key, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id) != 0) { + if (key && set_notesdata_field("key", key, ptr_andata->conn, ptr_andata->n_note_id) != 0) { if (key) { free((char*)key); @@ -978,5 +978,5 @@ /* set date */ - result = set_notesdata_field("date", ptr_andata->date_buffer, ptr_andata->conn, ptr_andata->driver, ptr_andata->n_note_id); + result = set_notesdata_field("date", ptr_andata->date_buffer, ptr_andata->conn, ptr_andata->n_note_id); /* close transaction, if any */ @@ -1183,10 +1183,8 @@ dbi_conn conn connection to database server - dbi_driver driver database driver - unsigned long long n_note_id id value of note ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -static int set_notesdata_field(const char* field, const char* value, dbi_conn conn, dbi_driver driver, unsigned long long n_note_id) { +static int set_notesdata_field(const char* field, const char* value, dbi_conn conn, unsigned long long n_note_id) { char* sql_command; char* new_sql_command; @@ -1214,5 +1212,5 @@ return 1; } - if (dbi_driver_quote_string(driver, "ed_value) == -1) { + if (dbi_conn_quote_string(conn, "ed_value) == 0) { free(quoted_value); LOG_PRINT(LOG_WARNING, "malloc failed"); @@ -1250,10 +1248,8 @@ dbi_conn conn connection to database server - dbi_driver driver database driver - unsigned long long n_note_id id value of note ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -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) { +static int set_notesdata_int_field(const char* field, unsigned long long n_value, dbi_conn conn, unsigned long long n_note_id) { char* sql_command; char* new_sql_command; @@ -1303,10 +1299,8 @@ dbi_conn conn connection to database server - dbi_driver driver database driver - unsigned long long n_note_id id value of note ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int insert_link(const char* type, const char* target, dbi_conn conn, dbi_driver driver, unsigned long long n_note_id) { +int insert_link(const char* type, const char* target, dbi_conn conn, unsigned long long n_note_id) { char* sql_command; char* new_sql_command; @@ -1339,5 +1333,5 @@ /* quote target to make it usable for a SQL query */ if ((quoted_target = strdup(target)) == NULL - || dbi_driver_quote_string(driver, "ed_target) == -1) { + || dbi_conn_quote_string(conn, "ed_target) == 0) { LOG_PRINT(LOG_WARNING, "malloc failed"); free(sql_command); Index: noteshandler.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/noteshandler.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -U2 -r1.6 -r1.6.2.1 --- noteshandler.h 15 Feb 2004 23:37:57 -0000 1.6 +++ noteshandler.h 26 Jul 2005 20:21:45 -0000 1.6.2.1 @@ -60,3 +60,3 @@ void notes_char_handler(void *ptr_data, const char *string, int len); -int insert_link(const char* type, const char* target, dbi_conn conn, dbi_driver driver, unsigned long long n_note_id); +int insert_link(const char* type, const char* target, dbi_conn conn, unsigned long long n_note_id); Index: refdbda.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbda.c,v retrieving revision 1.41.2.14 retrieving revision 1.41.2.15 diff -u -U2 -r1.41.2.14 -r1.41.2.15 --- refdbda.c 29 May 2005 19:38:17 -0000 1.41.2.14 +++ refdbda.c 26 Jul 2005 20:21:45 -0000 1.41.2.15 @@ -815,5 +815,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &myarg) == -1) { + if (dbi_conn_quote_string(conn, &myarg) == 0) { dbi_conn_close(conn); free(myarg); @@ -911,5 +911,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &myarg) == -1) { + if (dbi_conn_quote_string(conn, &myarg) == 0) { dbi_conn_close(conn); free(myarg); @@ -2001,5 +2001,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &mytoken) == -1) { + if (dbi_conn_quote_string(conn, &mytoken) == 0) { free(mytoken); ptr_addresult->failure++; @@ -2123,5 +2123,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &myarg) == -1) { + if (dbi_conn_quote_string(conn, &myarg) == 0) { send_status(ptr_clrequest->fd, 801, TERM_NO); LOG_PRINT(LOG_CRIT, get_status_msg(801)); Index: refdbdbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdbib.c,v retrieving revision 1.36.2.19 retrieving revision 1.36.2.20 diff -u -U2 -r1.36.2.19 -r1.36.2.20 --- refdbdbib.c 21 May 2005 23:47:10 -0000 1.36.2.19 +++ refdbdbib.c 26 Jul 2005 20:21:46 -0000 1.36.2.20 @@ -308,5 +308,5 @@ } - if (dbi_driver_quote_string(dbi_conn_get_driver(bibconns.conn_refdb), &myjournal) == -1) { + if (dbi_conn_quote_string(bibconns.conn_refdb, &myjournal) == 0) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -817,5 +817,5 @@ } - n_currpos = dbi_result_get_long(dbires, "sorted_pos"); + n_currpos = dbi_result_get_int(dbires, "sorted_pos"); if ((!n_currpos && dbi_conn_error_flag(bibconns.conn))) { ptr_addresult->failure++; @@ -1285,5 +1285,5 @@ } - if ((n_status = format_entry(&authorlist_buffer, &authorlist_buffer_len, pubtype, ptr_bibconns, dbires_cit, NULL, item, ptr_clrequest->username, 0, current_mset, biblio_info)) != 0) { + if ((n_status = format_entry(&authorlist_buffer, &authorlist_buffer_len, pubtype, ptr_bibconns, dbires_cit, NULL /* authorlist only */, item, ptr_clrequest->username, 0, current_mset, biblio_info)) != 0) { append_return_msg(ptr_addresult, n_status, NULL, ptr_bibconns->conn); free(id_string); @@ -1292,4 +1292,5 @@ return n_status; } +/* printf("authorlist_buffer:%s<< len:%d\n", authorlist_buffer, authorlist_buffer_len); */ if (strcmp(my_dbi_conn_get_cap(ptr_bibconns->conn, "multiple_db"), "t")) { @@ -1298,5 +1299,5 @@ } - if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_bibconns->conn), &authorlist_buffer) == -1) { + if (dbi_conn_quote_string(ptr_bibconns->conn, &authorlist_buffer) == 0) { append_return_msg(ptr_addresult, 801, NULL, ptr_bibconns->conn); free(id_string); @@ -1323,5 +1324,5 @@ } } - + sprintf(sql_command, "UPDATE %s SET author_abbrevlist=%s WHERE entry_id='%s'", table_name, authorlist_buffer, biblio_info->entry_id); LOG_PRINT(LOG_DEBUG, sql_command); @@ -1356,5 +1357,5 @@ /* quote item */ - if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_bibconns->conn), (char**)&item) == -1) { + if (dbi_conn_quote_string(ptr_bibconns->conn, (char**)&item) == 0) { append_return_msg(ptr_addresult, 241, NULL, ptr_bibconns->conn); free(sql_command); @@ -1687,5 +1688,5 @@ of (un-)successfully deleted styles - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ int deletestyle(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult) { dbi_conn conn; @@ -1747,5 +1748,5 @@ } - if (dbi_driver_quote_string(driver, &myarg) == -1) { + if (dbi_conn_quote_string(conn, &myarg) == 0) { send_status(ptr_clrequest->fd, 801, TERM_NO); LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -1865,5 +1866,5 @@ } - if (dbi_driver_quote_string(driver, &myarg) == -1) { + if (dbi_conn_quote_string(conn, &myarg) == 0) { LOG_PRINT(LOG_CRIT, get_status_msg(801)); send_status(ptr_clrequest->fd, 801, TERM_NO); @@ -2437,5 +2438,5 @@ } - if ((author_concat_q = strdup(author_concat)) == NULL || dbi_driver_quote_string(dbi_conn_get_driver(conn), &author_concat_q) == -1) { + if ((author_concat_q = strdup(author_concat)) == NULL || dbi_conn_quote_string(conn, &author_concat_q) == 0) { return -1; } Index: refdbdnote.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdnote.c,v retrieving revision 1.25.2.6 retrieving revision 1.25.2.7 diff -u -U2 -r1.25.2.6 -r1.25.2.7 --- refdbdnote.c 29 May 2005 19:35:37 -0000 1.25.2.6 +++ refdbdnote.c 26 Jul 2005 20:21:46 -0000 1.25.2.7 @@ -906,5 +906,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -952,5 +952,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1025,5 +1025,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1165,5 +1165,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1211,5 +1211,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1278,5 +1278,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1417,5 +1417,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1463,5 +1463,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1530,5 +1530,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1724,5 +1724,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -1851,5 +1851,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2027,5 +2027,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2604,5 +2604,5 @@ /* add links */ if (!n_remove) { - result = insert_link(my_type, ptr_curr->value, conn, dbi_conn_get_driver(conn), n_id); + result = insert_link(my_type, ptr_curr->value, conn, n_id); /* todo: fix output */ @@ -2641,5 +2641,5 @@ else { if ((quoted_token = strdup(ptr_curr->value)) == NULL - || dbi_driver_quote_string(driver, "ed_token) == -1) { + || dbi_conn_quote_string(conn, "ed_token) == 0) { send_status(ptr_clrequest->fd, 801, TERM_NO); LOG_PRINT(LOG_CRIT, get_status_msg(801)); Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.12 retrieving revision 1.65.2.13 diff -u -U2 -r1.65.2.12 -r1.65.2.13 --- refdbdref.c 12 Jun 2005 21:09:29 -0000 1.65.2.12 +++ refdbdref.c 26 Jul 2005 20:21:46 -0000 1.65.2.13 @@ -2279,5 +2279,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2329,5 +2329,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2408,5 +2408,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2546,5 +2546,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2592,5 +2592,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2665,5 +2665,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -2828,5 +2828,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -3004,5 +3004,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -3080,5 +3080,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -3202,5 +3202,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -3249,5 +3249,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -3395,5 +3395,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -3808,5 +3808,5 @@ break; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { retval = 1; break; @@ -3938,5 +3938,5 @@ return 1; } - if (dbi_driver_quote_string(driver, "ed_token) == -1) { + if (dbi_conn_quote_string(conn, "ed_token) == 0) { dbi_conn_close(conn); delete_all_lilimem(&sentinel); Index: risdata.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risdata.c,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -u -U2 -r1.5.2.2 -r1.5.2.3 --- risdata.c 29 May 2005 16:55:11 -0000 1.5.2.2 +++ risdata.c 26 Jul 2005 20:21:46 -0000 1.5.2.3 @@ -170,8 +170,8 @@ const char* fieldvalue the data proper - dbi_driver dbidrv the database driver + dbi_conn conn the database connection ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int set_risdata_field(struct RISDATA* ptr_risdata, const char* fieldname, const char* fieldvalue, dbi_driver dbidrv) { +int set_risdata_field(struct RISDATA* ptr_risdata, const char* fieldname, const char* fieldvalue, dbi_conn conn) { char* escape_buffer; char buffer[256]; /* buffer for log message */ @@ -193,5 +193,5 @@ /* escape any characters that the db cannot digest */ - if (dbi_driver_quote_string(dbidrv, &escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &escape_buffer) == 0) { free(escape_buffer); LOG_PRINT(LOG_WARNING, "malloc failed"); @@ -366,5 +366,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &escape_buffer) == -1) { + if (dbi_driver_quote_string(driver, &escape_buffer) == 0) { 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.44.2.4 retrieving revision 1.44.2.5 diff -u -U2 -r1.44.2.4 -r1.44.2.5 --- risdb.c 5 May 2005 17:21:36 -0000 1.44.2.4 +++ risdb.c 26 Jul 2005 20:21:46 -0000 1.44.2.5 @@ -139,5 +139,5 @@ strup(mytoken); /* convert token to uppercase */ - if (dbi_driver_quote_string(dbi_conn_get_driver(conn), &mytoken) == -1) { + if (dbi_conn_quote_string(conn, &mytoken) == 0) { free(dest); free(mytoken); @@ -764,5 +764,5 @@ } - result = set_risdata_field(ptr_risdata, "type", &token[6], driver); + result = set_risdata_field(ptr_risdata, "type", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -933,5 +933,5 @@ else if (strncmp("SP - ", token, 6) == 0) { /* start page number */ - result = set_risdata_field(ptr_risdata, "startpage", &token[6], driver); + result = set_risdata_field(ptr_risdata, "startpage", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -952,5 +952,5 @@ else if (strncmp("EP - ", token, 6) == 0) { /* end page number */ - result = set_risdata_field(ptr_risdata, "endpage", &token[6], driver); + result = set_risdata_field(ptr_risdata, "endpage", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -997,5 +997,5 @@ } - result = set_risdata_field(ptr_risdata, "title", &token[6], driver); + result = set_risdata_field(ptr_risdata, "title", &token[6], conn); if (result == 1) { @@ -1032,5 +1032,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &(perinfo.full)) == -1) { + if (dbi_conn_quote_string(conn, &(perinfo.full)) == 0) { sprintf(sql_command, "801:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); if ((new_msgpool = mstrcat(*ptr_msg_pool, sql_command, ptr_msg_pool_len, 0)) == NULL) { @@ -1061,5 +1061,5 @@ } - if (dbi_driver_quote_string(driver, &(perinfo.custabbrev1)) == -1) { + if (dbi_conn_quote_string(conn, &(perinfo.custabbrev1)) == 0) { sprintf(sql_command, "801:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); if ((new_msgpool = mstrcat(*ptr_msg_pool, sql_command, ptr_msg_pool_len, 0)) == NULL) { @@ -1090,5 +1090,5 @@ } - if (dbi_driver_quote_string(driver, &(perinfo.custabbrev2)) == -1) { + if (dbi_conn_quote_string(conn, &(perinfo.custabbrev2)) == 0) { sprintf(sql_command, "801:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); if ((new_msgpool = mstrcat(*ptr_msg_pool, sql_command, ptr_msg_pool_len, 0)) == NULL) { @@ -1123,5 +1123,5 @@ dotify_journal(perinfo.abbrev, conn, conn_refdb); - if (dbi_driver_quote_string(driver, &(perinfo.abbrev)) == -1) { + if (dbi_conn_quote_string(conn, &(perinfo.abbrev)) == 0) { sprintf(sql_command, "801:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); if ((new_msgpool = mstrcat(*ptr_msg_pool, sql_command, ptr_msg_pool_len, 0)) == NULL) { @@ -1140,5 +1140,5 @@ else if (strncmp("VL - ", token, 6) == 0) { /* volume number */ - result = set_risdata_field(ptr_risdata, "volume", &token[6], driver); + result = set_risdata_field(ptr_risdata, "volume", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1159,5 +1159,5 @@ else if (strncmp("BT - ", token, 6) == 0 || strncmp("T2 - ", token, 6) == 0) { /* book title */ - result = set_risdata_field(ptr_risdata, "booktitle", &token[6], driver); + result = set_risdata_field(ptr_risdata, "booktitle", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1178,5 +1178,5 @@ else if (strncmp("T3 - ", token, 6) == 0) { /* title series */ - result = set_risdata_field(ptr_risdata, "title_series", &token[6], driver); + result = set_risdata_field(ptr_risdata, "title_series", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1197,5 +1197,5 @@ else if (strncmp("CY - ", token, 6) == 0) { /* city of publication */ - result = set_risdata_field(ptr_risdata, "city", &token[6], driver); + result = set_risdata_field(ptr_risdata, "city", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1216,5 +1216,5 @@ else if (strncmp("PB - ", token, 6) == 0) { /* publisher */ - result = set_risdata_field(ptr_risdata, "publisher", &token[6], driver); + result = set_risdata_field(ptr_risdata, "publisher", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1239,5 +1239,5 @@ not part of the RIS spec as of RefMan 8.01. However, Endnote seems to use it for edition or something */ - result = set_risdata_field(ptr_risdata, "issue", &token[6], driver); + result = set_risdata_field(ptr_risdata, "issue", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1258,5 +1258,5 @@ else if (strncmp("N2 - ", token, 6) == 0) { /* abstract */ - result = set_risdata_field(ptr_risdata, "abstract", &token[6], driver); + result = set_risdata_field(ptr_risdata, "abstract", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1277,5 +1277,5 @@ else if (strncmp("SN - ", token, 6) == 0) { /* ISBN/ISSN */ - result = set_risdata_field(ptr_risdata, "issn", &token[6], driver); + result = set_risdata_field(ptr_risdata, "issn", &token[6], conn); if (result == 1) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1296,5 +1296,5 @@ else if (strncmp("AD - ", token, 6) == 0) { /* address */ - result = set_risdata_field(ptr_risdata, "address", &token[6], driver); + result = set_risdata_field(ptr_risdata, "address", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1315,5 +1315,5 @@ else if (strncmp("UR - ", token, 6) == 0) { /* URL */ - result = set_risdata_field(ptr_risdata, "url", &token[6], driver); + result = set_risdata_field(ptr_risdata, "url", &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1361,5 +1361,5 @@ /* user definable fields */ - result = set_risdata_field(ptr_risdata, tofield, &token[6], driver); + result = set_risdata_field(ptr_risdata, tofield, &token[6], conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1395,5 +1395,5 @@ /* link fields */ - result = set_risdata_field(ptr_risdata, tofield, &token[6], driver); + result = set_risdata_field(ptr_risdata, tofield, &token[6], conn); if (result == 1) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1418,5 +1418,5 @@ strcpy(real_citekey, &token[6]); preprocess_citekey(real_citekey); - result = set_risdata_field(ptr_risdata, "citekey", real_citekey, driver); + result = set_risdata_field(ptr_risdata, "citekey", real_citekey, conn); if (result) { sprintf(sql_command, "233:"ULLSPEC"\n", (unsigned long long)(set_count + nongeek_offset)); @@ -1510,5 +1510,5 @@ citekey = get_unique_citekey(conn, first_author, year, n_refdb_id, 0 /* refs */); - if (citekey && set_risdata_field(ptr_risdata, "citekey", citekey, driver) != 0) { + if (citekey && set_risdata_field(ptr_risdata, "citekey", citekey, conn) != 0) { if (citekey) { free((char*)citekey); @@ -2293,5 +2293,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); return 1; @@ -2396,5 +2396,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); free(sql_command); @@ -2458,5 +2458,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &another_escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); free(sql_command); @@ -2513,5 +2513,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &another_escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); free(sql_command); @@ -2568,5 +2568,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &another_escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); free(sql_command); @@ -2623,5 +2623,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &another_escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &another_escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); free(sql_command); @@ -2701,5 +2701,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); free(sql_command); @@ -2801,5 +2801,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); free(sql_command); @@ -2887,5 +2887,5 @@ /* escape any characters that the database server cannot digest */ - if (dbi_driver_quote_string(driver, &escape_buffer) == -1) { + if (dbi_conn_quote_string(conn, &escape_buffer) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); return 1; Index: risxhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/risxhandler.c,v retrieving revision 1.28.2.8 retrieving revision 1.28.2.9 diff -u -U2 -r1.28.2.8 -r1.28.2.9 --- risxhandler.c 31 May 2005 17:59:20 -0000 1.28.2.8 +++ risxhandler.c 26 Jul 2005 20:22:04 -0000 1.28.2.9 @@ -441,5 +441,5 @@ if (ptr_ardata->real_citekey && *ptr_ardata->real_citekey) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "citekey", ptr_ardata->real_citekey, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "citekey", ptr_ardata->real_citekey, ptr_ardata->conn); if (result == 1) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { @@ -450,5 +450,5 @@ } if (type && *type) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "type", type, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "type", type, ptr_ardata->conn); if (result == 1) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { @@ -725,5 +725,5 @@ 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); + result = set_risdata_field(ptr_ardata->ptr_risdata, "title", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); } else if (is_descendant_of(ptr_ardata->ptr_first, "publication")) { @@ -737,5 +737,5 @@ || !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); + result = set_risdata_field(ptr_ardata->ptr_risdata, "booktitle", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); } else if (!strcmp(ptr_ardata->type, "JOUR") @@ -748,5 +748,5 @@ || !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 (((ptr_ardata->perinfo).full = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_conn_quote_string(ptr_ardata->conn, &((ptr_ardata->perinfo).full)) == 0) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { (ptr_ardata->nmem_error)++; @@ -761,10 +761,10 @@ } else { - result = set_risdata_field(ptr_ardata->ptr_risdata, "title", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "title", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); } } 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 (((ptr_ardata->perinfo).abbrev = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_conn_quote_string(ptr_ardata->conn, &((ptr_ardata->perinfo).abbrev)) == 0) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { (ptr_ardata->nmem_error)++; @@ -780,5 +780,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 (((ptr_ardata->perinfo).custabbrev1 = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_conn_quote_string(ptr_ardata->conn, &((ptr_ardata->perinfo).custabbrev1)) == 0) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { (ptr_ardata->nmem_error)++; @@ -794,5 +794,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 (((ptr_ardata->perinfo).custabbrev2 = strdup((ptr_ardata->ptr_first)->ptr_elvalue)) == NULL || dbi_conn_quote_string(ptr_ardata->conn, &((ptr_ardata->perinfo).custabbrev2)) == 0) { if ((new_msgpool = mstrcat(ptr_ardata->msgpool, outomem_n.text, &(ptr_ardata->msgpool_len), 0)) == NULL) { (ptr_ardata->nmem_error)++; @@ -815,5 +815,5 @@ } else { /* set */ - result = set_risdata_field(ptr_ardata->ptr_risdata, "title_series", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "title_series", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); } @@ -1088,5 +1088,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "volume") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "volume", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "volume", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1105,5 +1105,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "issue") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "issue", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "issue", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1122,5 +1122,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "startpage") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "startpage", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "startpage", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1139,5 +1139,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "endpage") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "endpage", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "endpage", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1156,5 +1156,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "city") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "city", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "city", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1173,5 +1173,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "publisher") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "publisher", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "publisher", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1190,5 +1190,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "serial") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "issn", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "issn", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1207,5 +1207,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "address") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "address", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "address", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1224,5 +1224,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "url") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "url", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "url", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1263,5 +1263,5 @@ } - result = set_risdata_field(ptr_ardata->ptr_risdata, tofield, (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, tofield, (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1297,5 +1297,5 @@ } - result = set_risdata_field(ptr_ardata->ptr_risdata, tofield, (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, tofield, (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1334,5 +1334,5 @@ } - result = set_risdata_field(ptr_ardata->ptr_risdata, tofield, (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, tofield, (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { LOG_PRINT(LOG_WARNING, outomem.text); @@ -1468,5 +1468,5 @@ /* ------------------------------------------------------------ */ else if (!strcmp(el, "abstract") && ptr_ardata->replace_ref != 2) { - result = set_risdata_field(ptr_ardata->ptr_risdata, "abstract", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->driver); + result = set_risdata_field(ptr_ardata->ptr_risdata, "abstract", (ptr_ardata->ptr_first)->ptr_elvalue, ptr_ardata->conn); if (result == 1) { @@ -1689,5 +1689,5 @@ citekey = get_unique_citekey(ptr_ardata->conn, ptr_ardata->first_author, atoi(ptr_ardata->ck_year), ptr_ardata->n_refdb_id, 0 /* ref */); - if (citekey && set_risdata_field(ptr_ardata->ptr_risdata, "citekey", citekey, ptr_ardata->driver) != 0) { + if (citekey && set_risdata_field(ptr_ardata->ptr_risdata, "citekey", citekey, ptr_ardata->conn) != 0) { if (citekey) { free((char*)citekey); Index: xmlhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.c,v retrieving revision 1.22.2.15 retrieving revision 1.22.2.16 diff -u -U2 -r1.22.2.15 -r1.22.2.16 --- xmlhandler.c 6 May 2005 23:45:02 -0000 1.22.2.15 +++ xmlhandler.c 26 Jul 2005 20:22:04 -0000 1.22.2.16 @@ -513,5 +513,5 @@ } else { - if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_asdata->conn), &the_journal_q) == -1) { + if (dbi_conn_quote_string(ptr_asdata->conn, &the_journal_q) == 0) { (*(ptr_asdata->ptr_nmem_error))++; LOG_PRINT(LOG_CRIT, get_status_msg(801)); @@ -877,5 +877,5 @@ } else { - if (dbi_driver_quote_string(dbi_conn_get_driver(ptr_asdata->conn), &elvalue_q) == -1) { + if (dbi_conn_quote_string(ptr_asdata->conn, &elvalue_q) == 0) { /* todo: bail out */ } @@ -1536,8 +1536,8 @@ /* 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); + dbi_conn_quote_string(ptr_gbdata->conn, &my_refdb_title); + dbi_conn_quote_string(ptr_gbdata->conn, &my_refdb_volume); + dbi_conn_quote_string(ptr_gbdata->conn, &my_refdb_issue); + dbi_conn_quote_string(ptr_gbdata->conn, &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")); @@ -1601,5 +1601,5 @@ author_q = strdup(query_result); - if (!author_q || dbi_driver_quote_string(driver, &author_q) == -1) { + if (!author_q || dbi_conn_quote_string(ptr_gbdata->conn, &author_q) == 0) { LOG_PRINT(LOG_WARNING, "out of memory"); (*(ptr_gbdata->ptr_nmem_error))++; |
From: Markus H. <mho...@us...> - 2005-06-25 23:39:51
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3399 Modified Files: addons.html Log Message: updated for refdb-mode.el 1.15;added cvs link Index: addons.html =================================================================== RCS file: /cvsroot/refdb/homepage/addons.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -U2 -r1.6 -r1.7 --- addons.html 13 Jun 2005 19:55:18 -0000 1.6 +++ addons.html 25 Jun 2005 23:39:36 -0000 1.7 @@ -89,4 +89,7 @@ </tr> <tr> + <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> + </tr> + <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> @@ -161,7 +164,7 @@ <h2 id="refdb-mode">Emacs refdb-mode</h2> - <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> + <p class="authors">Current Author: Markus Hoenicka <mho...@us...></p> + <p><b><a href="addons/refdb-mode.el">Download refdb-mode.el (1.15)</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, and then some, for RefDB.</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> @@ -170,6 +173,8 @@ <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>DocBook SGML and XML as well as TEI XML files can be created via the refdbnd script</li> + <li>A set of commands allows to add citation elements in DocBook or TEI formats to the kill ring, containing one or more references returned by a previous query. These elements can then be yanked into your DocBook or TEI documents.</li> + <li>These documents can be transformed to various output formats via menu commands, and the output can be viewed immediately in external viewers via the menu</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> @@ -187,5 +192,5 @@ <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><a href="refdb-mode-cite.png"><img alt="Emacs refdb-mode" src="refdb-mode-cite-tiny.jpg"/></a> </td> <td><a href="refdb-mode-selectdb1.png"><img alt="Emacs refdb-mode" src="refdb-mode-selectdb1-tiny.jpg"/></a> @@ -198,5 +203,5 @@ <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 2c: </strong>Create citation elements from the results of a query.</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> |
From: Markus H. <mho...@us...> - 2005-06-25 23:38:54
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2790 Modified Files: download.html features.html index.html sysreq.html doc.html examples.html Log Message: added cvs link Index: download.html =================================================================== RCS file: /cvsroot/refdb/homepage/download.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -U2 -r1.8 -r1.9 --- download.html 20 May 2005 20:26:44 -0000 1.8 +++ download.html 25 Jun 2005 23:38:46 -0000 1.9 @@ -89,4 +89,7 @@ </tr> <tr> + <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> + </tr> + <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> Index: features.html =================================================================== RCS file: /cvsroot/refdb/homepage/features.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -U2 -r1.4 -r1.5 --- features.html 8 May 2005 21:24:33 -0000 1.4 +++ features.html 25 Jun 2005 23:38:46 -0000 1.5 @@ -89,4 +89,7 @@ </tr> <tr> + <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> + </tr> + <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> Index: index.html =================================================================== RCS file: /cvsroot/refdb/homepage/index.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -U2 -r1.6 -r1.7 --- index.html 20 May 2005 12:34:58 -0000 1.6 +++ index.html 25 Jun 2005 23:38:46 -0000 1.7 @@ -89,4 +89,7 @@ </tr> <tr> + <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> + </tr> + <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> Index: sysreq.html =================================================================== RCS file: /cvsroot/refdb/homepage/sysreq.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -U2 -r1.3 -r1.4 --- sysreq.html 8 May 2005 21:24:33 -0000 1.3 +++ sysreq.html 25 Jun 2005 23:38:46 -0000 1.4 @@ -89,4 +89,7 @@ </tr> <tr> + <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> + </tr> + <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> Index: doc.html =================================================================== RCS file: /cvsroot/refdb/homepage/doc.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -U2 -r1.5 -r1.6 --- doc.html 8 May 2005 21:24:33 -0000 1.5 +++ doc.html 25 Jun 2005 23:38:46 -0000 1.6 @@ -89,4 +89,7 @@ </tr> <tr> + <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> + </tr> + <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> Index: examples.html =================================================================== RCS file: /cvsroot/refdb/homepage/examples.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -U2 -r1.5 -r1.6 --- examples.html 8 May 2005 21:24:33 -0000 1.5 +++ examples.html 25 Jun 2005 23:38:46 -0000 1.6 @@ -89,4 +89,7 @@ </tr> <tr> + <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> + </tr> + <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> |
From: Markus H. <mho...@us...> - 2005-06-25 21:53:02
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13113 Modified Files: refdb-mode.el Log Message: added support for full-style citations;added function to normalize endterms and linkends in full-style citations Index: refdb-mode.el =================================================================== RCS file: /cvsroot/refdb/elisp/refdb-mode.el,v retrieving revision 1.14 retrieving revision 1.15 diff -u -U2 -r1.14 -r1.15 --- refdb-mode.el 22 Jun 2005 19:36:39 -0000 1.14 +++ refdb-mode.el 25 Jun 2005 21:52:53 -0000 1.15 @@ -2,9 +2,8 @@ ;; $Id$ -;; Copyright (C) 2003-2005 Michael Smith ;; Copyright (C) 2005 Markus Hoenicka -;; Author: Michael Smith <sm...@si...> -;; Maintainer: (1.10-current) Markus Hoenicka <ma...@mh...> +;; Authors: (-1.9) Michael Smith <sm...@si...> +;; (1.10-current) Markus Hoenicka <ma...@mh...> ;; Created: 2003-11-04 ;; Revision: $Revision$ @@ -44,7 +43,8 @@ ;;; Compatibility ;; ------------------------------------------------------------------- -;; `refdb-mode' requires RefDB version 0.9.4 or later. It has been -;; tested and found to work with the Linux (Debian), Cygwin/X-Windows, -;; and Win32-native "NTEmacs" versions of GNU Emacs 21.2 and 20.7. +;; `refdb-mode' requires RefDB version 0.9.6 or later. It has been +;; tested and found to work with the Linux, FreeBSD, Cygwin/X-Windows, +;; and Win32-native "NTEmacs" versions of GNU Emacs 21.3 (the shell +;; commands work best in the latter if you use Cygwin bash) ;; ;; It has also been tested with OSX (Panther) using a build compiled @@ -294,5 +294,5 @@ ;; RefDB queries (i.e., values passed as arguments to the -t and ;; -s options for the 'refdbc -C getref' and 'refdbc -C getnote' -;; commands.) +;; commands.) and for the citations. ;; ;; Select Database @@ -440,4 +440,6 @@ ;; ------------------------------------------------------------------- ;; +;; - define keyboard shortcuts for the most used commands +;; ;; - integrate RefDB's own data converters into the menu ;; @@ -618,5 +620,6 @@ (defcustom refdb-gnumake-program "make" - "File name of the GNU make utility." + "File name of the GNU make utility. On systems using their own +version of make the executable is often called 'gmake'." :type 'string :group 'refdb-external-programs) @@ -675,4 +678,19 @@ ) +(defcustom refdb-use-short-citations-document-flag nil + "Non-nil means that after creating a new document the file +for use with short-style citations will be loaded for editing. +Nil means that the file for use with full citations will be loaded." + :type 'boolean + :group 'refdb + ) + +(defcustom refdb-auto-normalize-linkends-flag t + "Non-nil means normalize the endterms and linkends of RefDB citations +before running a transformation." + :type 'boolean + :group 'refdb + ) + (defcustom refdb-data-output-types '( @@ -713,4 +731,13 @@ :group 'refdb-data-options) +(defcustom refdb-citation-types + '( + short + full + ) + "*List of supported citation formats for RefDB." + :type '(list symbol symbol) + :group 'refdb-data-options) + (defcustom refdb-data-output-additional-fields '(N1 N2 UR) @@ -812,5 +839,5 @@ ) -;; file viewers. (x)html files are handled via browse-url +;; file viewers. (x)html files are handled by browse-url (defcustom refdb-pdf-view-program "gv" "File name of the PDF file viewer." @@ -849,9 +876,4 @@ ;; other external programs -(defcustom refdb-gnumake-program "make" - "File name of the GNU make executable. It is usually called 'make' or 'gmake'." - :type 'string - :group 'refdb-external-programs) - (defcustom refdb-bibutils-bib2xml-program "bib2xml" "File name of the bibutils bib2xml executable." @@ -1396,4 +1418,21 @@ ) +(defun refdb-select-citation-type (citationtype) + "Set RefDB citation type to CITATIONTYPE. +Note that CITATIONTYPE is a symbol, not a string." + (interactive + (list (intern + (completing-read + "Citation Type: " + (refdb-make-alist-from-symbol-list refdb-citation-types) + nil t + ) + ) + ) + ) + (setq refdb-citation-type citationtype) + (message "Current citation type is now '%s'" (symbol-name citationtype)) + ) + (defvar refdb-addref-menu-item ["Add References" (refdb-addref-on-region) t] @@ -1825,4 +1864,18 @@ ) +(defvar refdb-select-citation-type-submenu-contents + (list "Select Citation Output Type" + ["Short" + (refdb-select-citation-type 'short) + :style toggle + :selected (eq refdb-citation-type 'short)] + ["Full" + (refdb-select-citation-type 'full) + :style toggle + :selected (eq refdb-citation-type 'full)] + ) + "RefDB 'Select Citation Type' submenu." + ) + (defvar refdb-whichdb-menu-item ["Show Database Info" (refdb-whichdb) t] @@ -3750,10 +3803,14 @@ (equal type "DocBook SGML 4.0") (equal type "DocBook SGML 4.1")) - ".short.sgml") + (if refdb-use-short-citations-document-flag + ".short.sgml" + ".sgml")) ((or (equal type "DocBook XML 4.1.2") (equal type "DocBook XML 4.2") (equal type "DocBook XML 4.3") (equal type "TEI XML P4")) - ".short.xml") + (if refdb-use-short-citations-document-flag + ".short.xml" + ".xml")) )) (document-root (completing-read "Document root element: " @@ -3801,5 +3858,6 @@ document-cssfile ) - "*refdb-output*" "*refdb-messages*") +; "*refdb-output*" "*refdb-messages*") + nil "*refdb-messages*") (find-file (format @@ -3822,8 +3880,21 @@ "Transform a document to an output format for printing or online browsing" (interactive) + (if refdb-auto-normalize-linkends-flag + (progn + (refdb-normalize-linkends) + (save-buffer) + (set-buffer-modified-p nil)) + ) + (if (buffer-modified-p) + (if (y-or-n-p "Save changes before transformation? ") + (progn + (save-buffer) + (set-buffer-modified-p nil)) + ) + ) (message "Transforming document to %s..." type) ;; todo: append filename to make process name buffer-unique (start-process - "refdb-transform" + (concat "refdb-transform-" (buffer-name)) (get-buffer-create "*refdb-messages*") refdb-gnumake-program @@ -3840,8 +3911,21 @@ ;; separately to start-process + (if refdb-auto-normalize-linkends-flag + (progn + (refdb-normalize-linkends) + (save-buffer) + (set-buffer-modified-p nil)) + ) + (if (buffer-modified-p) + (if (y-or-n-p "Save changes before transformation? ") + (progn + (save-buffer) + (set-buffer-modified-p nil)) + ) + ) (message "Transforming document to %s..." type) ;; todo: append filename to make process name buffer-unique (start-process - "refdb-transform" + (concat "refdb-transform-" (buffer-name)) (get-buffer-create "*refdb-messages*") refdb-gnumake-program @@ -3877,5 +3961,7 @@ buffer-file-name 0 - (string-match "\\.short\\." buffer-file-name)) + (if (string-match "\\.short\\." buffer-file-name) + (string-match "\\.short\\." buffer-file-name) + (string-match "\\.[^\\.]+$" buffer-file-name))) "." type)))) @@ -3989,9 +4075,35 @@ (while (re-search-forward "^ID - \\(.*\\)$" region-extended-end t) ; (message "match:%s" (match-string 1 nil)) - (setq id-string (concat id-string ";" (match-string 1 nil)))) - ;; remove leading semicolon - (if (not (string= id-string "")) - (substring id-string 1) - "") + (if (eq refdb-citation-type 'short) + (setq id-string (concat id-string ";" (match-string 1 nil))) + (setq id-string (concat id-string + (format + "<xref linkend=\"ID%s-X\"/>" + (match-string 1 nil)) + )) + ) + ) + ;; remove leading semicolon in short type strings + (cond ((and + (eq refdb-citation-type 'short) + (not (string= id-string ""))) + (substring id-string 1)) + ((and + (eq refdb-citation-type 'full) + (not (string= id-string ""))) + (let ((linkend + (progn + (string-match "linkend=\"\\([^-\"]*\\)" id-string) + (match-string 1 id-string)))) + (concat + (format + "<xref endterm=\"IM0\" linkend=\"%s\" role=\"MULTIXREF\"/>" + linkend + ) + id-string) + )) + (t + id-string) + ) ) ) @@ -4019,7 +4131,25 @@ (setq id-string (concat id-string ";" (match-string 1 nil)))) ;; remove leading semicolon - (if (not (string= id-string "")) - (substring id-string 1) - "") + (cond ((and + (eq refdb-citation-type 'short) + (not (string= id-string ""))) + (substring id-string 1)) + ((and + (eq refdb-citation-type 'full) + (not (string= id-string ""))) + (let ((linkend + (progn + (string-match "linkend=\"\\([^-\"]*\\)" id-string) + (match-string 1 id-string)))) + (concat + (format + "<xref endterm=\"IM0\" linkend=\"%s\" role=\"MULTIXREF\"/>" + linkend + ) + id-string) + )) + (t + id-string) + ) ) ) @@ -4072,5 +4202,9 @@ (re-search-backward "^TY - " nil t) (if (re-search-forward "^ID - \\(.*\\)$" eor t) - (match-string 1 nil) + (if (eq refdb-citation-type 'short) + (match-string 1 nil) + (format + "<xref linkend=\"ID%s-X\"/>" + (match-string 1 nil))) nil) ) @@ -4084,5 +4218,9 @@ (re-search-backward "<entry" nil t) (if (re-search-forward "citekey=\"\\(.*\\)\"" eor t) - (match-string 1 nil) + (if (eq refdb-citation-type 'short) + (match-string 1 nil) + (format + "<xref linkend=\"ID%s-X\"/>" + (match-string 1 nil))) nil) ) @@ -4090,4 +4228,31 @@ ) +(defun refdb-normalize-linkends () + (interactive) + (save-excursion + (let ((im-count 1) + (id-list)) + ;; replace full and author citations with the "subsequent" equivalents + ;; where appropriate + (goto-char (point-min)) + (while (re-search-forward "linkend=\"ID\\([^-\"]+\\)-\\([AQSXY]\\)\"" nil t) + (if (member (match-string 1 nil) id-list) + (cond ((equal (match-string 2 nil) "A") + (replace-match "Q" nil t nil 2)) + ((equal (match-string 2 nil) "X") + (replace-match "S" nil t nil 2))) + (setq id-list (append (list (match-string 1 nil)) id-list)) + ) + ) + ;; make the endterms of multiple citations unique + (goto-char (point-min)) + (while (re-search-forward "endterm=\"IM\\([^\"]+\\)\"" nil t) + (replace-match + (format "%s" im-count) + nil t nil 1) + (setq im-count (+ 1 im-count))) + ) + ) + ) (defun refdb-make-alist-from-list (list) @@ -5333,4 +5498,12 @@ ) +(defcustom refdb-citation-type 'short + "*Specifies the default citation type." + :type '(choice (const :tag "Short " short) + (const :tag "Full " full) + ) + :group 'refdb-data-options + ) + (defcustom refdb-data-output-submenu-contents '( @@ -5339,4 +5512,5 @@ refdb-select-data-output-format-submenu-contents refdb-select-additional-data-fields-menu-item + refdb-select-citation-type-submenu-contents ) "*Contents of 'Customize Data Output' submenu for RefDB mode. |
From: Markus H. <mho...@us...> - 2005-06-22 20:19:02
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15402/scripts Modified Files: Tag: Release_0_9_5_stable refdbxml.in Log Message: updated classpaths for recent java tools versions Index: refdbxml.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/refdbxml.in,v retrieving revision 1.12.2.5 retrieving revision 1.12.2.6 diff -u -U2 -r1.12.2.5 -r1.12.2.6 --- refdbxml.in 14 Nov 2004 15:49:44 -0000 1.12.2.5 +++ refdbxml.in 22 Jun 2005 20:18:52 -0000 1.12.2.6 @@ -268,10 +268,10 @@ # get the full dos path of the classpath root osclasspath_root=$(cygpath -w $classpath_root) - classpath="$osclasspath_root\avalon-framework-4.0.jar;$osclasspath_root\batik.jar;$osclasspath_root\fop.jar;$osclasspath_root\jfor-0.5.1.jar;$osclasspath_root\jimi-1.0.jar;$osclasspath_root\logkit-1.0b4.jar;$osclasspath_root\sax.jar;$osclasspath_root\xalan.jar;$osclasspath_root\xerces.jar;$osclasspath_root\xp.jar;$osclasspath_root\xt.jar" + classpath="$osclasspath_root\avalon-framework.jar;$osclasspath_root\batik.jar;$osclasspath_root\fop.jar;$osclasspath_root\jfor.jar;$osclasspath_root\jimi-1.0.jar;$osclasspath_root\logkit.jar;$osclasspath_root\sax.jar;$osclasspath_root\xalan.jar;$osclasspath_root\xerces.jar;$osclasspath_root\xp.jar;$osclasspath_root\xt.jar" jfosheet=$(cygpath -w $fosheet) jhtmlsheet=$(cygpath -w $htmlsheet) jxhtmlsheet=$(cygpath -w $xhtmlsheet) else - classpath="$classpath_root/avalon-framework-4.0.jar:$classpath_root/batik.jar:$classpath_root/fop.jar:$classpath_root/jfor-0.5.1.jar:$classpath_root/jimi-1.0.jar:$classpath_root/logkit-1.0b4.jar:$classpath_root/sax.jar:$classpath_root/saxon.jar:$classpath_root/saxon-fop.jar:$classpath_root/saxon-jdom.jar:$classpath_root/xalan.jar:$classpath_root/xerces.jar:$classpath_root/xp.jar:$classpath_root/xt.jar" + classpath="$classpath_root/avalon-framework.jar:$classpath_root/batik.jar:$classpath_root/fop.jar:$classpath_root/jfor.jar:$classpath_root/jimi-1.0.jar:$classpath_root/logkit.jar:$classpath_root/sax.jar:$classpath_root/saxon.jar:$classpath_root/saxon-fop.jar:$classpath_root/saxon-jdom.jar:$classpath_root/xalan.jar:$classpath_root/xerces.jar:$classpath_root/xp.jar:$classpath_root/xt.jar" jfosheet=$fosheet jhtmlsheet=$htmlsheet |
From: Markus H. <mho...@us...> - 2005-06-22 20:15:11
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13451/scripts Modified Files: Tag: Release_0_9_5_stable refdbnd.in Log Message: use DocBook XML 4.3 as the default doctype;add support for DocBook XML 4.3;allow silent operation even if the cssfile argument is missing Index: refdbnd.in =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/refdbnd.in,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -u -U2 -r1.8.2.3 -r1.8.2.4 --- refdbnd.in 17 Sep 2004 19:59:27 -0000 1.8.2.3 +++ refdbnd.in 22 Jun 2005 20:15:01 -0000 1.8.2.4 @@ -25,5 +25,5 @@ # user variable defaults defbasename="refdbtest" -defdoctype="db41" +defdoctype="db43x" defpubtype="book" defdatabase="refdbtest" @@ -34,4 +34,5 @@ encoding="" cssfile="" +silent="f" # Makefile-generated defaults @@ -65,8 +66,14 @@ encoding=`grep "^<?xml version=\"1.0\"" $basename | sed 's/^.*encoding=\"\(.*\)\".*/\1/'` else - if grep "^<!DOCTYPE.*TEI P4//DTD Main DTD Driver File//EN" $basename; then - doctype="teix" - pubtype=`grep "TEI P4//DTD Main DTD Driver File//EN" $basename | sed 's/^<!DOCTYPE \(.*\) PUBLIC.*/\1/'` + if grep "^<!DOCTYPE.*DTD DocBook XML V4.2//EN" $basename; then + doctype="db43x" + pubtype=`grep "DTD DocBook XML V4.3//EN" $basename | sed 's/^<!DOCTYPE \(.*\) PUBLIC.*/\1/'` encoding=`grep "^<?xml version=\"1.0\"" $basename | sed 's/^.*encoding=\"\(.*\)\".*/\1/'` + else + if grep "^<!DOCTYPE.*TEI P4//DTD Main DTD Driver File//EN" $basename; then + doctype="teix" + pubtype=`grep "TEI P4//DTD Main DTD Driver File//EN" $basename | sed 's/^<!DOCTYPE \(.*\) PUBLIC.*/\1/'` + encoding=`grep "^<?xml version=\"1.0\"" $basename | sed 's/^.*encoding=\"\(.*\)\".*/\1/'` + fi fi fi @@ -79,7 +86,7 @@ } -# if we have seven command line arguments, we'll use them. Otherwise -# ask interactively -if [ -z "$*" ] || [ "$#" -ne 7 ]; then +# if we have at least six command line arguments (cssfile is optional), we'll +# use them. Otherwise ask interactively +if [ -z "$*" ] || [ "$#" -lt 6 ]; then # get arguments interactively clear @@ -109,6 +116,6 @@ echo "Please enter the type of the document. Available types are 'db31'," echo "'db40', and 'db41' for DocBook SGML versions 3.1, 4.0, and 4.1," - echo "respectively, 'db41x' and 'db42x' for DocBook XML versions 4.1.2 and" - echo "4.2, respectively, and 'teix' for TEI XML P4" + echo "respectively, 'db41x', 'db42x', and 'db43x' for DocBook XML versions" + echo "4.1.2, 4.2, and 4.3, respectively, as well as 'teix' for TEI XML P4" echo "[$defdoctype]" read doctype @@ -177,4 +184,22 @@ fi + echo "You've selected the following values:" + echo "Basename: $basename" + echo "Document type: $doctype" + echo "Publication type: $pubtype" + echo "Database: $database" + echo "Bibliography style: $style" + echo "Encoding: $encoding" + echo "CSS file: $cssfile" + + echo "" + echo "Is this ok?" + echo "[y]" + read ok + + if [ -z "$ok" ]; then + ok="y" + fi + else # all arguments were specified on the command line @@ -187,30 +212,23 @@ encoding=$6 cssfile=$7 -fi -echo "You've selected the following values:" -echo "Basename: $basename" -echo "Document type: $doctype" -echo "Publication type: $pubtype" -echo "Database: $database" -echo "Bibliography style: $style" -echo "Encoding: $encoding" -echo "CSS file: $cssfile" - -echo "" -echo "Is this ok?" -echo "[y]" -read ok + # mangle stylename to generate the name of the CSS file + defcssfile=${style%.*}.css + if [ -z "$cssfile" ]; then + cssfile=$defcssfile + fi -if [ -z "$ok" ]; then ok="y" + silent="t" fi -if [ "$ok" = "y" ] || [ "$ok" = "Y" ]; then - echo "Fine, so then ..." - echo "" -else - echo "Please try again" - exit 1 +if [ "$silent" = "f" ]; then + if [ "$ok" = "y" ] || [ "$ok" = "Y" ]; then + echo "Fine, so then ..." + echo "" + else + echo "Please try again" + exit 1 + fi fi @@ -226,5 +244,5 @@ dist="dist: pdfdist psdist rtfdist htmldist" transformscript="refdbjade";; - db41x | db42x ) doctypeswitch="db31x" + db41x | db42x | db43x) doctypeswitch="db31x" extension="xml" htmlstylesheet=".html.xsl" @@ -247,6 +265,8 @@ sed "s%<doctypeswitch>%$doctypeswitch%" < $maketemplate | sed "s%<pubtype>%$pubtype%" | sed "s%<basename>%$basename%" | sed "s%<extension>%$extension%" | sed "s%<style>%$style%" | sed "s%<htmlstylesheet>%$htmlstylesheet%" | sed "s%<xhtmlstylesheet>%$xhtmlstylesheet%" | sed "s%<printstylesheet>%$printstylesheet%" | sed "s%<database>%$database%" | sed "s%all: pdf rtf html%$makeall%" | sed "s%dist: pdfdist rtfdist htmldist%$dist%" | sed "s%<transformscript>%$transformscript%" | sed "s%<encoding>%$encoding%" | sed "s%<cssfile>%$cssfile%" > Makefile -echo "Makefile created." -echo "" +if [ "$silent" = "f" ]; then + echo "Makefile created." + echo "" +fi encodingstring=" encoding=\"$encoding\"" @@ -255,32 +275,38 @@ if [ -z $xfile ]; then case "$doctype" in - db31 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>" > $basename.short.$extension;; - db40 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.0//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>" > $basename.short.$extension;; - db41 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>" > $basename.short.$extension;; - db41x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>" > $basename.short.$extension;; - db42x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>" > $basename.short.$extension;; - teix ) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE TEI.2 PUBLIC \"-//TEI P4//DTD Main DTD Driver File//EN\" \"http://www.tei-c.org/P4X/DTD/tei2.dtd\" [\n<!ENTITY % TEI.general 'INCLUDE'>\n<!ENTITY % TEI.names.dates 'INCLUDE'>\n<!ENTITY % TEI.linking 'INCLUDE'>\n<!ENTITY % TEI.XML 'INCLUDE'>\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>" > $basename.short.$extension;; + db31 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; + db40 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.0//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; + db41 ) echo -e "<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; + db41x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; + db42x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; + db43x) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE $pubtype PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\" \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\" [\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; + teix ) echo -e "<?xml version=\"1.0\"$encodingstring?>\n<!DOCTYPE TEI.2 PUBLIC \"-//TEI P4//DTD Main DTD Driver File//EN\" \"http://www.tei-c.org/P4X/DTD/tei2.dtd\" [\n<!ENTITY % TEI.general 'INCLUDE'>\n<!ENTITY % TEI.names.dates 'INCLUDE'>\n<!ENTITY % TEI.linking 'INCLUDE'>\n<!ENTITY % TEI.XML 'INCLUDE'>\n<!ENTITY bibliography SYSTEM \"$basename.bib.$extension\">\n]>\n<!-- include the bibliography at the chapter level by inserting the entity &bibliography; -->\n" > $basename.short.$extension;; esac - echo "Document $basename.short.$extension created." + if [ "$silent" = "f" ]; then + echo "Document $basename.short.$extension created." + fi else - echo "Your existing document is called $xfile." + if [ "$silent" = "f" ]; then + echo "Your existing document is called $xfile." + fi fi - -echo "" -echo "After editing this file you can use the following commands to create" -echo "formatted output:" -echo "make pdf to create a Portable Document Format (PDF) file ($basename.pdf)" -if [ "$doctype" = "db41x" ] || [ "$doctype" = "db42x" ]; then - echo "make html to create HTML output ($basename.html)" - echo "make xhtml to create XHTML output ($basename.xhtml)" -else - echo "make html to create HTML output (${pubtype}1.html)" -fi -echo "make rtf to create a Rich Text Format (RTF) file ($basename.rtf)" -if [ "$extension" = "sgml" ]; then - echo "make ps to create a Postscript file ($basename.ps)" +if [ "$silent" = "f" ]; then + echo "" + echo "After editing this file you can use the following commands to create" + echo "formatted output:" + echo "make pdf to create a Portable Document Format (PDF) file ($basename.pdf)" + if [ "$doctype" = "db41x" ] || [ "$doctype" = "db42x" ]; then + echo "make html to create HTML output ($basename.html)" + echo "make xhtml to create XHTML output ($basename.xhtml)" + else + echo "make html to create HTML output (${pubtype}1.html)" + fi + echo "make rtf to create a Rich Text Format (RTF) file ($basename.rtf)" + if [ "$extension" = "sgml" ]; then + echo "make ps to create a Postscript file ($basename.ps)" + fi + echo "make all to create all available output formats" fi -echo "make all to create all available output formats" exit 0 |
From: Markus H. <mho...@us...> - 2005-06-22 20:12:19
|
Update of /cvsroot/refdb/refdb/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12328/examples Modified Files: Tag: Release_0_9_5_stable Makefile.template Log Message: include postscript into SGML output;fix the basename vs pubtype schism between the DSSSL and the XSLT stylesheets for html output;make jfor the default fo processor if rtf output is requested Index: Makefile.template =================================================================== RCS file: /cvsroot/refdb/refdb/examples/Makefile.template,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -U2 -r1.8.2.2 -r1.8.2.3 --- Makefile.template 12 Sep 2004 21:03:12 -0000 1.8.2.2 +++ Makefile.template 22 Jun 2005 20:12:10 -0000 1.8.2.3 @@ -47,5 +47,5 @@ all: pdf rtf html xhtml else -all: pdf rtf html +all: ps pdf rtf html-dsssl endif @@ -53,5 +53,11 @@ dist: pdfdist rtfdist htmldist xhtmldist else -dist: pdfdist rtfdist htmldist +dist: psdist pdfdist rtfdist html-dsssl-dist +endif + +ifeq ($(doctype),db31x) +rtfarg = "-f jfor" +else +rtfarg = "" endif @@ -70,7 +76,9 @@ rtf: $(basename).rtf -html: $(pubtype)1.html +html: $(basename).html + +html-dsssl: $(pubtype)1.html -xhtml: $(pubtype)1.xhtml +xhtml: $(basename).xhtml bib: $(basename).bib.$(extension) @@ -87,5 +95,8 @@ tar -czf $(basename).rtf.tar.gz $(basename).rtf -htmldist: $(pubtype)1.html +htmldist: $(basename).html + tar -czf $(basename).html.tar.gz *.html $(cssarchive) + +html-dsssl-dist: $(pubtype)1.html tar -czf $(basename).html.tar.gz *.html $(cssarchive) @@ -122,10 +133,13 @@ $(basename).rtf: $(basename).$(extension) $(basename).bib.$(extension) - $(transformscript) -s $(printstylesheet) -t rtf $(basename).$(extension) + $(transformscript) -s $(printstylesheet) -t rtf $(rtfarg) $(basename).$(extension) + +$(basename).html: $(basename).$(extension) $(basename).bib.$(extension) + $(transformscript) -s $(htmlstylesheet) -t html $(basename).$(extension) $(pubtype)1.html: $(basename).$(extension) $(basename).bib.$(extension) $(transformscript) -s $(htmlstylesheet) -t html $(basename).$(extension) -$(pubtype)1.xhtml: $(basename).$(extension) $(basename).bib.$(extension) +$(basename).xhtml: $(basename).$(extension) $(basename).bib.$(extension) $(transformscript) -s $(xhtmlstylesheet) -t xhtml $(basename).$(extension) |
From: Markus H. <mho...@us...> - 2005-06-22 20:08:10
|
Update of /cvsroot/refdb/refdb/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9820/etc Modified Files: Tag: Release_0_9_5_stable refdbxmlrc Log Message: preconfigure xslt_classpath and fo_classpath Index: refdbxmlrc =================================================================== RCS file: /cvsroot/refdb/refdb/etc/refdbxmlrc,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -U2 -r1.1.2.2 -r1.1.2.3 --- refdbxmlrc 14 Nov 2004 15:47:43 -0000 1.1.2.2 +++ refdbxmlrc 22 Jun 2005 20:08:02 -0000 1.1.2.3 @@ -47,5 +47,5 @@ # /usr/share/java # Do not use backslashes to concatenate lines. -#xslt_classpath /usr/share/java +#xslt_classpath <classpath_root> ## FO processor @@ -74,5 +74,5 @@ # /usr/share/java # Do not use backslashes to concatenate lines. -#fo_classpath /usr/share/java +#fo_classpath <classpath_root> ## FOP configuration file (optional). This option is useful to add font |
From: Markus H. <mho...@us...> - 2005-06-22 20:07:10
|
Update of /cvsroot/refdb/refdb/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9435/etc Modified Files: Tag: Release_0_9_5_stable Makefile.am Log Message: insert classpath_root into config files Index: Makefile.am =================================================================== RCS file: /cvsroot/refdb/refdb/etc/Makefile.am,v retrieving revision 1.13.2.2 retrieving revision 1.13.2.3 diff -u -U2 -r1.13.2.2 -r1.13.2.3 --- Makefile.am 6 May 2005 23:43:21 -0000 1.13.2.2 +++ Makefile.am 22 Jun 2005 20:06:59 -0000 1.13.2.3 @@ -18,4 +18,5 @@ sed 's%<dbs_encoding>%$(dbs_encoding)%' | \ sed 's%<db_path>%$(db_dir)%' | \ + sed 's%<classpath_root>%$(classpath_root)%' | \ sed 's%<db_server>%$(db_server)%' > $@ |
From: Markus H. <mho...@us...> - 2005-06-22 20:06:24
|
Update of /cvsroot/refdb/refdb/dtd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9020/dtd Modified Files: Tag: Release_0_9_5_stable risx.dtd Log Message: added version in doctype instructions Index: risx.dtd =================================================================== RCS file: /cvsroot/refdb/refdb/dtd/risx.dtd,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -U2 -r1.12.2.1 -r1.12.2.2 --- risx.dtd 29 May 2005 22:33:22 -0000 1.12.2.1 +++ risx.dtd 22 Jun 2005 20:06:15 -0000 1.12.2.2 @@ -4,5 +4,5 @@ <!-- Invoke with the following declaration --> -<!-- <!DOCTYPE ris PUBLIC "-//Markus Hoenicka//DTD Ris V1.0.2//EN" "http://refdb.sourceforge.net/dtd/risx-1.0.2/risx.dtd"> --> +<!-- <!DOCTYPE ris PUBLIC "-//Markus Hoenicka//DTD Ris V1.0.3//EN" "http://refdb.sourceforge.net/dtd/risx-1.0.3/risx.dtd"> --> <!-- the top-level element --> |
From: Markus H. <mho...@us...> - 2005-06-22 20:03:50
|
Update of /cvsroot/refdb/refdb/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7429/conf Modified Files: Tag: Release_0_9_5_stable config.guess config.sub install-sh missing mkinstalldirs Log Message: updated to newer autotools versions Index: config.guess =================================================================== RCS file: /cvsroot/refdb/refdb/conf/config.guess,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -U2 -r1.2 -r1.2.2.1 --- config.guess 29 May 2003 21:37:20 -0000 1.2 +++ config.guess 22 Jun 2005 20:03:20 -0000 1.2.2.1 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2001-08-21' +timestamp='2003-07-02' # This file is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner <bo...@cy...>. -# Please send patches to <con...@gn...>. +# Originally written by Per Bothner <pe...@bo...>. +# Please send patches to <con...@gn...>. Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to @@ -88,21 +89,33 @@ fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; @@ -111,5 +124,5 @@ ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. @@ -128,5 +141,5 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or + # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently @@ -135,20 +148,21 @@ # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -167,5 +181,16 @@ esac # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: @@ -173,67 +198,93 @@ echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <<EOF >$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? @@ -248,27 +299,9 @@ echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) @@ -292,4 +325,11 @@ echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -320,5 +360,5 @@ exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in @@ -334,10 +374,4 @@ echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - sparc*:NetBSD:*) - echo `uname -p`-unknown-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -366,16 +400,4 @@ echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} @@ -394,4 +416,5 @@ exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus @@ -415,9 +438,7 @@ } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; @@ -425,4 +446,10 @@ echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix @@ -485,4 +512,5 @@ *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <sys/systemcfg.h> @@ -496,7 +524,5 @@ } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then @@ -507,5 +533,5 @@ exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -547,8 +573,6 @@ 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in @@ -559,10 +583,11 @@ 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE @@ -597,10 +622,19 @@ } EOF - eval $set_cc_for_build - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; @@ -610,4 +644,5 @@ exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <unistd.h> @@ -635,7 +670,5 @@ } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; @@ -665,7 +698,4 @@ echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd @@ -686,7 +716,4 @@ echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' @@ -701,7 +728,4 @@ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' @@ -710,7 +734,7 @@ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` @@ -719,7 +743,4 @@ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -731,9 +752,20 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/FreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) @@ -746,9 +778,15 @@ echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix + echo i586-pc-interix exit 0 ;; i*:UWIN*:*) @@ -770,6 +808,9 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) @@ -777,8 +818,40 @@ exit 0 ;; mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) @@ -816,4 +889,7 @@ echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -829,5 +905,6 @@ # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_targets=`cd /; ld --help 2>&1 \ + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g @@ -841,5 +918,5 @@ a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" @@ -852,31 +929,27 @@ esac # Determine whether the default compiler is a.out or elf - cat >$dummy.c <<EOF -#include <features.h> -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; @@ -895,4 +968,21 @@ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` @@ -916,11 +1006,11 @@ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL @@ -929,7 +1019,4 @@ fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: @@ -955,7 +1042,13 @@ echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ @@ -974,7 +1067,4 @@ echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} @@ -1048,4 +1138,7 @@ echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} @@ -1055,16 +1148,22 @@ exit 0 ;; *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; @@ -1089,9 +1188,4 @@ echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1112,6 +1206,6 @@ echo pdp10-unknown-its exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac @@ -1120,4 +1214,5 @@ #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ @@ -1234,7 +1329,5 @@ EOF -eval $set_cc_for_build -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. Index: config.sub =================================================================== RCS file: /cvsroot/refdb/refdb/conf/config.sub,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -U2 -r1.2 -r1.2.2.1 --- config.sub 29 May 2003 21:37:20 -0000 1.2 +++ config.sub 22 Jun 2005 20:03:20 -0000 1.2.2.1 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2001-08-13' +timestamp='2003-07-04' # This file is (in principle) common to ALL GNU software. @@ -30,5 +30,6 @@ # the same distribution terms that you use for the rest of that program. -# Please send patches to <con...@gn...>. +# Please send patches to <con...@gn...>. Submit a context +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. @@ -118,5 +119,5 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -227,29 +228,42 @@ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | msp430 \ | ns16k | ns32k \ - | openrisc \ + | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | s390 | s390x \ - | sh | sh[34] | sh[34]eb | shbe | shle \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ - | tahoe | thumb | tic80 | tron \ - | v850 \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ | we32k \ - | x86 | xscale \ + | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown @@ -278,23 +292,37 @@ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alphapca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cray2-* | cydra-* \ - | d10v-* | d30v-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \ - | mipsle-* | mipstx39-* | mipstx39el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ @@ -302,12 +330,15 @@ | pyramid-* \ | romp-* | rs6000-* \ - | s390-* | s390x-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ - | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ - | v850-* | vax-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ | ymp-* \ | z8k-*) @@ -343,4 +374,7 @@ os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; amdahl) basic_machine=580-amdahl @@ -374,4 +408,8 @@ os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex @@ -394,14 +432,6 @@ os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; @@ -418,4 +448,12 @@ basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) @@ -598,12 +636,4 @@ os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` @@ -620,4 +650,8 @@ os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc @@ -692,4 +726,8 @@ basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem @@ -699,4 +737,8 @@ os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -721,17 +763,20 @@ basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; - pentiumii | pentium2) + pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; @@ -739,7 +784,10 @@ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumii-* | pentium2-*) + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould @@ -748,20 +796,20 @@ ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown - ;; + ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown - ;; + ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` @@ -784,8 +832,24 @@ basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent @@ -795,5 +859,8 @@ os=-hms ;; - sparclite-wrs) + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks @@ -862,5 +929,9 @@ ;; t3e) - basic_machine=t3e-cray + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray os=-unicos ;; @@ -869,4 +940,12 @@ os=-coff ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown @@ -875,4 +954,8 @@ basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr @@ -899,6 +982,6 @@ ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs @@ -921,15 +1004,11 @@ os=-proelf ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt + xps | xps100) + basic_machine=xps100-honeywell ;; - xmp) - basic_machine=xmp-cray + ymp) + basic_machine=ymp-cray os=-unicos ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; z8k-*-coff) basic_machine=z8k-unknown @@ -952,11 +1031,4 @@ basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm @@ -978,11 +1050,14 @@ basic_machine=we32k-att ;; - sh3 | sh4 | sh3eb | sh4eb) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; @@ -999,8 +1074,4 @@ basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. @@ -1058,5 +1129,5 @@ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ @@ -1065,8 +1136,10 @@ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos*) + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; @@ -1080,6 +1153,8 @@ esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ @@ -1120,4 +1195,7 @@ os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd @@ -1126,6 +1204,9 @@ os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) @@ -1166,6 +1247,12 @@ os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos ;; -none) @@ -1200,8 +1287,12 @@ os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; @@ -1230,4 +1321,7 @@ os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 @@ -1293,8 +1387,8 @@ os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; @@ -1302,8 +1396,8 @@ os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; @@ -1377,5 +1471,5 @@ vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; Index: install-sh =================================================================== RCS file: /cvsroot/refdb/refdb/conf/install-sh,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.4.1 diff -u -U2 -r1.1.1.1 -r1.1.1.1.4.1 --- install-sh 22 May 2001 05:42:51 -0000 1.1.1.1 +++ install-sh 22 Jun 2005 20:03:20 -0000 1.1.1.1.4.1 @@ -1,18 +1,37 @@ #!/bin/sh -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2004-04-01.17 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# Copyright 1991 by the Massachusetts Institute of Technology +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent @@ -24,5 +43,4 @@ # shared with many OS's install programs. - # set DOITPROG to echo to test this script @@ -30,5 +48,4 @@ doit="${DOITPROG-}" - # put in absolute paths if you don't have them in your path; or use env. vars. @@ -42,210 +59,267 @@ mkdirprog="${MKDIRPROG-mkdir}" -transformbasename="" -transform_arg="" +transformbasename= +transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +chowncmd= +chgrpcmd= +stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac +src= +dst= +dir_arg= + +usage="Usage: $0 [OPTION]... SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 -d DIRECTORIES... + +In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. +In the second, create the directory path DIR. + +Options: +-b=TRANSFORMBASENAME +-c copy source (using $cpprog) instead of moving (using $mvprog). +-d create directories instead of installing files. +-g GROUP $chgrp installed files to GROUP. +-m MODE $chmod installed files to MODE. +-o USER $chown installed files to USER. +-s strip installed files (using $stripprog). +-t=TRANSFORM +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit 0;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + --version) echo "$0 $scriptversion"; exit 0;; + + *) # When -d is used, all remaining arguments are directories to create. + test -n "$dir_arg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + instcmd=: + chmodcmd= + else + instcmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac - pathcomp="${pathcomp}/" + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" || lasterr=$? + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $instcmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + # If we're going to rename the final executable, determine the name now. + if test -z "$transformarg"; then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename \ + | sed $transformarg`$transformbasename + fi + + # don't allow the sed command to completely eliminate the filename. + test -z "$dstfile" && dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Move or copy the file name to the temp name + $doit $instcmd "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit; } done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - -exit 0 +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: Index: missing =================================================================== RCS file: /cvsroot/refdb/refdb/conf/missing,v retrieving revision 1.1.1.1.4.1 retrieving revision 1.1.1.1.4.2 diff -u -U2 -r1.1.1.1.4.1 -r1.1.1.1.4.2 --- missing 2 Feb 2005 20:04:00 -0000 1.1.1.1.4.1 +++ missing 22 Jun 2005 20:03:21 -0000 1.1.1.1.4.2 @@ -1,5 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + +scriptversion=2003-09-02.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 +# Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pi...@ir...>, 1996. @@ -39,4 +43,6 @@ fi +msg="missing on your system" + case "$1" in --run) @@ -45,4 +51,13 @@ shift "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi ;; esac @@ -75,9 +90,11 @@ makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to <bug...@gn...>." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.4 - GNU automake" + echo "missing $scriptversion (GNU Automake)" ;; @@ -95,5 +112,5 @@ echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from @@ -109,5 +126,5 @@ echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU @@ -123,5 +140,5 @@ echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them @@ -147,5 +164,5 @@ echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. @@ -163,8 +180,8 @@ echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the proper tools for further handling them. - You can get \`$1Help2man' as part of \`Autoconf' from any GNU + You can get \`$1' as part of \`Autoconf' from any GNU archive site." @@ -186,5 +203,5 @@ bison|yacc) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get @@ -216,5 +233,5 @@ lex|flex) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get @@ -244,5 +261,5 @@ echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take @@ -269,5 +286,5 @@ echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious @@ -294,8 +311,8 @@ # messages. if (gnutar --version > /dev/null 2>&1); then - gnutar ${1+"$@"} && exit 0 + gnutar "$@" && exit 0 ... [truncated message content] |