[Refdb-cvs] CVS: refdb/src backend-risx.c,1.30.2.5,1.30.2.6
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2005-05-31 17:57:28
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5245 Modified Files: Tag: Release_0_9_5_stable backend-risx.c Log Message: fixed reprint date output Index: backend-risx.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-risx.c,v retrieving revision 1.30.2.5 retrieving revision 1.30.2.6 diff -u -U2 -r1.30.2.5 -r1.30.2.6 --- backend-risx.c 17 Apr 2005 00:09:07 -0000 1.30.2.5 +++ backend-risx.c 31 May 2005 17:57:19 -0000 1.30.2.6 @@ -209,5 +209,5 @@ nhave_buffer_data = 1; - if (print_element_x(item, &buffer, &buffer_len, "title", NULL, NULL, &xindent) == NULL) { + if (print_element_x(item, &buffer, &buffer_len, "title", "type", "full", &xindent) == NULL) { free(buffer); free((char*)item); @@ -314,5 +314,5 @@ if (item != NULL) { - if (print_element_x(item, &buffer, &buffer_len, "title", "type", "gen", &xindent) == NULL) { + if (print_element_x(item, &buffer, &buffer_len, "title", "type", "full", &xindent) == NULL) { free(buffer); free((char*)item); @@ -378,5 +378,5 @@ nhave_buffer_data = 1; - if (print_element_x(item, &buffer, &buffer_len, "title", "type", "gen", &xindent) == NULL) { + if (print_element_x(item, &buffer, &buffer_len, "title", "type", "full", &xindent) == NULL) { free((char*)item); return 801; @@ -1178,6 +1178,49 @@ } - if (print_element_x((reprint.date != NULL) ? reprint.date : "", ptr_buffer, ptr_buffer_len, "reprint", "status", attribute, ptr_indent) == NULL) { - return NULL; + if (!strcmp(attribute, "ONREQUEST") && reprint.date != NULL) { + char year[5]; + char month[3]; + char day[3]; + + strncpy(year, reprint.date, 4); + year[4] = '\0'; + strncpy(month, reprint.date+5, 2); + month[2] = '\0'; + strncpy(day, reprint.date+8, 2); + day[2] = '\0'; + + if (print_elstart_x(ptr_buffer, ptr_buffer_len, "reprint", "status", attribute, NULL, NULL, NULL, NULL, NULL, NULL, 0, ptr_indent) == NULL) { + return NULL; + } + + if (print_elstart_x(ptr_buffer, ptr_buffer_len, "date", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, ptr_indent) == NULL) { + return NULL; + } + + if (print_element_x(year, ptr_buffer, ptr_buffer_len, "year", NULL, NULL, ptr_indent) == NULL) { + return NULL; + } + + if (print_element_x(month, ptr_buffer, ptr_buffer_len, "month", NULL, NULL, ptr_indent) == NULL) { + return NULL; + } + + if (print_element_x(day, ptr_buffer, ptr_buffer_len, "day", NULL, NULL, ptr_indent) == NULL) { + return NULL; + } + + + if (print_elend_x(ptr_buffer, ptr_buffer_len, "date", ptr_indent) == NULL) { + return NULL; + } + + if (print_elend_x(ptr_buffer, ptr_buffer_len, "reprint", ptr_indent) == NULL) { + return NULL; + } + } + else { + if (print_element_x("", ptr_buffer, ptr_buffer_len, "reprint", "status", attribute, ptr_indent) == NULL) { + return NULL; + } } } |