FreeBSD Bugzilla – Attachment 21196 Details for
Bug 37186
Dbview contains an error, because of which at review dbf files with text boxes which length of 255 characters , the program crashed.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
all-patch.txt
all-patch.txt (text/plain), 11.75 KB, created by
Alexander Trapeznikov
on 2002-05-30 11:52:05 UTC
(
hide
)
Description:
all-patch.txt
Filename:
MIME Type:
Creator:
Alexander Trapeznikov
Created:
2002-05-30 11:52:05 UTC
Size:
11.75 KB
patch
obsolete
>diff -uN /usr/ports/databases/dbview/files/patch-aa /usr/ports/databases/dbview/files.old/patch-aa >--- /usr/ports/databases/dbview/files/patch-aa Wed May 15 18:26:22 2002 >+++ /usr/ports/databases/dbview/files.old/patch-aa Thu May 30 14:19:33 2002 >@@ -1,17 +1,20 @@ >---- Makefile Fri Sep 27 00:05:30 1996 >-+++ /home/andy/tmp/wrk/Makefile Fri May 7 09:48:58 1999 >-@@ -18,8 +18,8 @@ >- >+--- /usr/ports/databases/dbview/work/dbview-1.0.3/Makefile Fri Sep 27 00:05:30 1996 >++++ /usr/ports/databases/dbview.old/work/dbview-1.0.3.1/Makefile Wed Apr 17 16:07:17 2002 >+@@ -19,11 +19,12 @@ > MAN=man > >--CC= gcc >+ CC= gcc > -CFLAGS= -O6 -fomit-frame-pointer -Wall -pipe >-+#CC= gcc >-+#CFLAGS= -O6 -fomit-frame-pointer -Wall -pipe >++CFLAGS= -O6 -fomit-frame-pointer -pipe > # CFLAGS= -g -fomit-frame-pointer -Wall -pipe > > # Look where your install program is >-@@ -32,15 +32,15 @@ >+ # >++LOCALBASE=/usr/local >+ INSTALL = /usr/bin/install >+ prefix = /usr >+ bindir = $(prefix)/bin >+@@ -32,19 +33,19 @@ > obj = db_dump.o dbview.o version.o > > .c.o: >@@ -29,8 +32,14 @@ > + makedepend -I$(LOCALBASE)/include *.c > > install: all >- $(INSTALL) -d -o root -g root -m 755 $(bindir) >-@@ -56,13 +56,14 @@ >+- $(INSTALL) -d -o root -g root -m 755 $(bindir) >+- $(INSTALL) -s -o root -g root -m 755 dbview $(bindir) >++ $(INSTALL) -d -o root -g wheel -m 755 $(bindir) >++ $(INSTALL) -s -o root -g wheel -m 755 dbview $(bindir) >+ $(INSTALL) -d -o $(MAN) -g $(MAN) -m 755 $(mandir)/man1 >+ $(INSTALL) -o $(MAN) -g $(MAN) -m 644 dbview.1 $(mandir)/man1 >+ >+@@ -56,13 +57,14 @@ > > # DO NOT DELETE > >@@ -45,13 +54,13 @@ > -dbview.o: version.h db_dump.h /usr/include/stdio.h /usr/include/libio.h > -dbview.o: /usr/include/_G_config.h /usr/include/getopt.h > +db_dump.o: db_dump.h /usr/include/fcntl.h /usr/include/sys/types.h >-+db_dump.o: /usr/include/sys/cdefs.h /usr/include/inttypes.h >++db_dump.o: /usr/include/sys/cdefs.h /usr/include/sys/inttypes.h > +db_dump.o: /usr/include/machine/ansi.h /usr/include/machine/types.h > +db_dump.o: /usr/include/machine/endian.h /usr/include/sys/stat.h > +db_dump.o: /usr/include/sys/time.h /usr/include/time.h > +db_dump.o: /usr/include/sys/_posix.h /usr/include/stdio.h > +db_dump.o: /usr/include/unistd.h /usr/include/sys/unistd.h >-+db_dump.o: /usr/include/stdlib.h /usr/include/stdlib.h /usr/include/ctype.h >++db_dump.o: /usr/include/malloc.h /usr/include/stdlib.h /usr/include/ctype.h > +db_dump.o: /usr/include/runetype.h /usr/include/string.h > +dbview.o: version.h db_dump.h /usr/include/stdio.h /usr/include/sys/cdefs.h > +dbview.o: /usr/include/machine/ansi.h /usr/local/include/getopt.h >diff -uN /usr/ports/databases/dbview/files/patch-db_dump.c /usr/ports/databases/dbview/files.old/patch-db_dump.c >--- /usr/ports/databases/dbview/files/patch-db_dump.c Thu Jan 1 03:00:00 1970 >+++ /usr/ports/databases/dbview/files.old/patch-db_dump.c Thu May 30 14:16:24 2002 >@@ -0,0 +1,112 @@ >+--- /usr/ports/databases/dbview/work/dbview-1.0.3/db_dump.c Thu May 30 14:15:30 2002 >++++ /usr/ports/databases/dbview.old/work/dbview-1.0.3.1/db_dump.c Wed Apr 17 15:56:46 2002 >+@@ -164,6 +164,9 @@ >+ int flags; >+ { >+ int fields; >++ char *info; >++ char *lang; >++ char *cdx; >+ DBASE_FIELD *fld; >+ >+ if(dbfile==-1) { >+@@ -171,26 +174,71 @@ >+ return; >+ } >+ read(dbfile,&dbhead,sizeof(DBASE_HEAD)); >+- if( !(dbhead.version==3 || dbhead.version==0x83) ) { >++ if ( ! ( dbhead.version==0x03 || dbhead.version==0x83 || dbhead.version==0x04 || dbhead.version==0x05 || dbhead.version==0x8b || dbhead.version==0xf5 ) ) { >+ printf ("Version %d not supported\n",dbhead.version); >+- if(dbhead.version==0x8b ) { >+- printf ("dBase IV - partially known...\n"); >++ if (dbhead.version==0x8e ) { >++ printf ("dBase IV or dBase V with SQL table - partially known...\n"); >+ } >++ if (dbhead.version==0x43 || dbhead.version==0xb3){ >++ printf ("FlagShip - partially known...\n"); >++ } >+ return; >+ } >++ if (dbhead.version==0x03){ >++ info="Plain dbf, dBaseIII+"; >++ } >++ if (dbhead.version==0x04){ >++ info="Plain dbf, dBaseIV+"; >++ } >++ if (dbhead.version==0x05){ >++ info="Plain dbf, dBaseV or FoxPro"; >++ } >++ if (dbhead.version==0x83){ >++ info="dBaseIII+ w/memo"; >++ } >++ if (dbhead.version==0x8b){ >++ info="dBaseIV+ w/memo"; >++ } >++ if (dbhead.version==0xf5){ >++ info="FoxPro w/memo"; >++ } >++ >++ fields=(dbhead.header-1)/32-1; >+ >++ if (dbhead.excdx){ >++ cdx="Yes"; >++ } >++ else{ >++ cdx="No"; >++ } >++ if (dbhead.language==101){ >++ lang="DOS 866"; >++ } >++ else if (dbhead.language==2){ >++ lang="WIN 1251"; >++ } >++ else if (dbhead.language==2){ >++ lang="DOS 850 Multi ling"; >++ } >++ else if (dbhead.language==1){ >++ lang="DOS 437 USA"; >++ } >++ else{ >++ lang="Unknow"; >++ } >+ if (flags & DB_FL_INFO) { >+- printf("File version : %d\n",dbhead.version); >+- printf("Last update : %02d/%02d/%2d\n", dbhead.l_update[1],dbhead.l_update[2],dbhead.l_update[0]); >+- printf("Number of recs: %ld\n",dbhead.count); >+- printf("Header length : %d\n",dbhead.header); >+- printf("Record length : %d\n",dbhead.lrecl); >++ printf("File version : %d, %s\n",dbhead.version,info); >++ printf("Last update : %02d/%02d/%2d\n", dbhead.l_update[1],dbhead.l_update[2],dbhead.l_update[0]+1900); >++ printf("Number of recs : %ld\n",dbhead.count); >++ printf("Header length : %d\n",dbhead.header); >++ printf("Record length : %d\n",dbhead.lrecl); >++ printf("Exist index cdx : %s\n",cdx); >++ printf("Language ID : %s\n",lang); >++ printf("Count fields : %d\n\n",fields); >+ } >+ >+ Buffer=malloc(dbhead.lrecl); >+- >+- fields=(dbhead.header-1)/32-1; >+- >++ >+ if (flags & DB_FL_DESCR) { >+ printf("Field Name\tType\tLength\tDecimal Pos\n"); >+ } >+@@ -227,7 +275,7 @@ >+ char delim; >+ { >+ int bytes; >+- >++ lseek(dbfile,dbhead.header,SEEK_SET); >+ while(cnt) { >+ bytes=read(dbfile,Buffer,dbhead.lrecl); >+ if(bytes!=dbhead.lrecl) >+@@ -253,7 +301,6 @@ >+ char delim; >+ { >+ FLD_LIST *temp; >+- >+ temp=db_fld_root; >+ while (temp) { >+ memcpy(buf_work,temp->data,temp->fld->length); >diff -uN /usr/ports/databases/dbview/files/patch-db_dump.h /usr/ports/databases/dbview/files.old/patch-db_dump.h >--- /usr/ports/databases/dbview/files/patch-db_dump.h Thu Jan 1 03:00:00 1970 >+++ /usr/ports/databases/dbview/files.old/patch-db_dump.h Thu May 30 14:16:52 2002 >@@ -0,0 +1,55 @@ >+--- /usr/ports/databases/dbview/work/dbview-1.0.3/db_dump.h Tue Oct 8 11:18:40 1996 >++++ /usr/ports/databases/dbview.old/work/dbview-1.0.3.1/db_dump.h Tue Jul 17 14:38:22 2001 >+@@ -48,7 +48,10 @@ >+ #define DB_FL_TRIM 0x20 >+ >+ typedef struct dbase_head { >+- unsigned char version; /* 03 for dbIII and 83 for dbIII w/memo file */ >++ unsigned char version; /* 0x03,0x04,0x05-DBIII+/DBIV */ >++ /* 0x83 - DBIII+ w/memo;*/ >++ /* 0xF5-FoxPro w/memo;*/ >++ /* 0x8B-DBIV w/memo file */ >+ unsigned char l_update[3]; /* yymmdd for last update*/ >+ unsigned long count; /* number of records in file*/ >+ unsigned short header; /* length of the header >+@@ -58,21 +61,32 @@ >+ * includes the delete >+ * byte >+ */ >+- unsigned char reserv[20]; >++ unsigned char reserv1[16]; >++ unsigned char excdx; /* 1-exist cdx file, 0 - nonexist*/ >++ unsigned char language; /* language driver:0x01 - 437 DOS;0x02 - 850 DOS; 0x03 - 1251; 0x00 - ignored*/ >++ unsigned char reserv2[2]; >+ } DBASE_HEAD; >+- >+-#define DB_FLD_CHAR 'C' >+-#define DB_FLD_NUM 'N' >+-#define DB_FLD_LOGIC 'L' >+-#define DB_FLD_MEMO 'M' >+-#define DB_FLD_DATE 'D' >++ >++#define DB_FLD_CHAR 'C' >++#define DB_FLD_NUM 'N' >++#define DB_FLD_LOGIC 'L' >++#define DB_FLD_VARIABLE 'V' >++#define DB_FLD_MEMO 'M' >++#define DB_FLD_FLOAT 'F' >++#define DB_FLD_PICTURE 'P' >++#define DB_FLD_BINARY 'B' >++#define DB_FLD_GENERAL 'G' >++#define DB_FLD_SHINT '2' >++#define DB_FLD_LINT '4' >++#define DB_FLD_DOUBLE '8' >++#define DB_FLD_DATE 'D' >+ >+ typedef struct dbase_fld { >+ char name[11]; /*field name*/ >+ char type; /*field type*/ >+ /* A-T uses large data model but drop it for now */ >+ char *data_ptr; /*pointer into buffer*/ >+- char length; /*field length*/ >++ unsigned char length; /*field length*/ >+ char dec_point; /*field decimal point*/ >+ char fill[14]; >+ } DBASE_FIELD; >diff -uN /usr/ports/databases/dbview/files/patch-dbview.c /usr/ports/databases/dbview/files.old/patch-dbview.c >--- /usr/ports/databases/dbview/files/patch-dbview.c Thu Jan 1 03:00:00 1970 >+++ /usr/ports/databases/dbview/files.old/patch-dbview.c Thu May 30 14:17:16 2002 >@@ -0,0 +1,53 @@ >+--- /usr/ports/databases/dbview/work/dbview-1.0.3/dbview.c Tue Oct 8 11:04:23 1996 >++++ /usr/ports/databases/dbview.old/work/dbview-1.0.3.1/dbview.c Wed Apr 17 16:16:53 2002 >+@@ -34,19 +34,19 @@ >+ >+ void help_short() >+ { >+- printf ("%s %s - %s, (c) 1996 by Martin Schulze\n", progname, version, longname); >++ printf ("%s %s - %s, (c) 1996 by Martin Schulze, Patched Alexander Trapeznikov, 2001 \n", progname, version, longname); >+ printf ("\n"); >+- printf ("%s [-b [-t]] [-d delim] [-e] [-h] [-i] [-o] [-o] [-v] dbfile\n", progname); >++ printf ("%s [-b [-t]] [-d delim] [-e] [-h|-H] [-i] [-o] [-o] [-v] dbfile\n", progname); >+ } >+ >+ void help_long() >+ { >+- printf ("%s %s - %s, (c) 1996 by Martin Schulze\n", progname, version, longname); >++ printf ("%s %s - %s, (c) 1996 by Martin Schulze, Patched Alexander Trapeznikov, 2001 \n", progname, version, longname); >+ printf ("\n"); >+ printf (" --browse, -b browse the database\n"); >+ printf (" --delimiter, -d set the delimiter for browse output\n"); >+ printf (" --description, -e display field description\n"); >+- printf (" --help, -h display help\n"); >++ printf (" --help, -H, -h display help\n"); >+ printf (" --info, -i display db information\n"); >+ printf (" --omit, -o omit db records\n"); >+ printf (" --reserve, -r reserve fieldnames from beeing translated\n"); >+@@ -54,7 +54,7 @@ >+ printf (" --version, -v display version\n"); >+ } >+ >+-void main (int argc, char **argv) >++int main (int argc, char **argv) >+ { >+ int opt_index; >+ char c; >+@@ -80,6 +80,8 @@ >+ switch (c) { >+ case 'H': /* --help */ >+ help_long (); exit (0); >++ case 'h': /* --help */ >++ help_long (); exit (0); >+ case 'b': >+ flags |= DB_FL_BROWSE; >+ break; >+@@ -93,8 +95,6 @@ >+ case 'e': >+ flags |= DB_FL_DESCR; >+ break; >+- case 'h': >+- help_short (); exit (0); >+ case 'i': >+ flags |= DB_FL_INFO; >+ break; >diff -uN /usr/ports/databases/dbview/files/patch-version.c /usr/ports/databases/dbview/files.old/patch-version.c >--- /usr/ports/databases/dbview/files/patch-version.c Thu Jan 1 03:00:00 1970 >+++ /usr/ports/databases/dbview/files.old/patch-version.c Thu May 30 14:17:48 2002 >@@ -0,0 +1,11 @@ >+--- /usr/ports/databases/dbview/work/dbview-1.0.3/version.c Fri Sep 27 00:03:57 1996 >++++ /usr/ports/databases/dbview.old/work/dbview-1.0.3.1/version.c Tue Jul 17 03:50:48 2001 >+@@ -21,6 +21,6 @@ >+ >+ >+ char progname[] = "dbview"; >+-char longname[] = "View dBase III files"; >++char longname[] = "View dbf files"; >+ >+-char version[] = "1.0.2"; >++char version[] = "1.0.3.1"; >=
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 37186
:
21192
|
21193
|
21194
|
21195
| 21196