Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32481
Modified Files:
Tag: Release_0_9_5_stable
backend-bibtex.c
Log Message:
added school,institution,publisher output
Index: backend-bibtex.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/backend-bibtex.c,v
retrieving revision 1.16.2.9
retrieving revision 1.16.2.10
diff -u -U2 -r1.16.2.9 -r1.16.2.10
--- backend-bibtex.c 3 Jan 2006 09:05:20 -0000 1.16.2.9
+++ backend-bibtex.c 11 Jan 2006 21:01:04 -0000 1.16.2.10
@@ -740,4 +740,55 @@
}
+ /*----------------------------------------------------------------*/
+ /* publisher, school, institution */
+ item = get_refdb_publisher(ptr_rendinfo->dbires);
+ if (item != NULL) {
+ char pubfield[20];
+
+ if (strcmp(type, "THES") == 0) {
+ strcpy(pubfield, " SCHOOL = {");
+ }
+ else if (strcmp(type, "RPRT") == 0) {
+ strcpy(pubfield, " INSTITUTION = {");
+ }
+ else {
+ strcpy(pubfield, " PUBLISHER = {");
+ }
+
+ if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), pubfield, ptr_rendinfo->ptr_ref_len, 0)) == NULL) {
+ unload_style();
+ LOG_PRINT(LOG_CRIT, get_status_msg(801));
+ if (!n_multiple_db) {
+ dbi_conn_close(bibconns.conn_refdb);
+ }
+ return 801;
+ }
+ else {
+ *(ptr_rendinfo->ptr_ref) = new_ref;
+ }
+ if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), (char*)item, ptr_rendinfo->ptr_ref_len, 0)) == NULL) { /* publisher */
+ unload_style();
+ LOG_PRINT(LOG_CRIT, get_status_msg(801));
+ if (!n_multiple_db) {
+ dbi_conn_close(bibconns.conn_refdb);
+ }
+ return 801;
+ }
+ else {
+ *(ptr_rendinfo->ptr_ref) = new_ref;
+ }
+ if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "},\n", ptr_rendinfo->ptr_ref_len, 0)) == NULL) {
+ unload_style();
+ LOG_PRINT(LOG_CRIT, get_status_msg(801));
+ if (!n_multiple_db) {
+ dbi_conn_close(bibconns.conn_refdb);
+ }
+ return 801;
+ }
+ else {
+ *(ptr_rendinfo->ptr_ref) = new_ref;
+ }
+ }
+
/* eliminate the trailing comma and finish with an empty line */
if ((new_ref = mstrcat(*(ptr_rendinfo->ptr_ref), "\n}\n", ptr_rendinfo->ptr_ref_len, 2)) == NULL) {
|