From: Frank Schlottmann-G. <fs...@us...> - 2000-11-11 15:45:10
|
Update of /cvsroot/firebird/TCS/tcs/tcs In directory slayer.i.sourceforge.net:/tmp/cvs-serv22358/TCS/tcs/tcs Modified Files: display.e makefile.linux Log Message: changes in display.e to handle blobs with any seg_size Index: display.e =================================================================== RCS file: /cvsroot/firebird/TCS/tcs/tcs/display.e,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** display.e 2000/11/11 10:25:52 1.1.1.1 --- display.e 2000/11/11 15:45:06 1.2 *************** *** 20,23 **** --- 20,24 ---- * * Contributor(s): ______________________________________. + * $Id$ */ *************** *** 25,29 **** #include <string.h> #include "tcs.h" ! #if (defined WIN_NT || defined OS2_ONLY) static ULONG *open_blob (SLONG* blob_id, SLONG* db_handle); --- 26,30 ---- #include <string.h> #include "tcs.h" ! #include <gds.h> #if (defined WIN_NT || defined OS2_ONLY) static ULONG *open_blob (SLONG* blob_id, SLONG* db_handle); *************** *** 288,292 **** --- 289,295 ---- if (!(blob = open_blob (blob_id, db_handle))) + { return TRUE; + } /* Loop through the blob for each segment, printing each segment * *************** *** 294,304 **** buf_len = sizeof (buffer) - 1; /* APOLLO cannot type cast const value */ ! while (!gds__get_segment (status_vector, GDS_REF (blob), GDS_REF (length), buf_len, /* SSHORT, not int. Andrew */ ! buffer)) ! { if (lines++ == 0) printf ("-------------------\n"); --- 297,320 ---- buf_len = sizeof (buffer) - 1; /* APOLLO cannot type cast const value */ ! ! /* I changed the following to handle blobs with segment_length > buf_len ! * though I don't know why we don't use BLOB_display directly ! * FSG 11.Nov.2000 */ ! ! ! for (;;) ! { ! gds__get_segment (status_vector, GDS_REF (blob), GDS_REF (length), buf_len, /* SSHORT, not int. Andrew */ ! buffer); ! if (status_vector [1] && status_vector [1] != gds__segment) ! { ! if (status_vector [1] != gds__segstr_eof) ! gds__print_status (status_vector); ! break; ! } if (lines++ == 0) printf ("-------------------\n"); *************** *** 306,309 **** --- 322,326 ---- fputs (buffer, stdout); } + /* Close the BLOB and clean up. */ Index: makefile.linux =================================================================== RCS file: /cvsroot/firebird/TCS/tcs/tcs/makefile.linux,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** makefile.linux 2000/11/11 10:25:54 1.1.1.1 --- makefile.linux 2000/11/11 15:45:06 1.2 *************** *** 15,18 **** --- 15,19 ---- # # Contributor(s): ______________________________________. + # $Id$ .SUFFIXES: .c .e .gdb .gdl .e.c : *************** *** 21,25 **** gdef $< ! TARGETS= tcs tan # Purify related flags --- 22,27 ---- gdef $< ! TARGETS= tcs ! # removed tan temporarily FSG 11.Nov.2000 # Purify related flags |