From 17aad0420174ec175c6bf78b45c62a2c4da22efe Mon Sep 17 00:00:00 2001 From: gdr-ftp Date: Sat, 7 Feb 1998 06:40:11 +0000 Subject: [PATCH] There used to be a limit of 65k on the size of the describe database source when using descu. This limit was imposed due to a bug in ORCA/C (it is no longer clear whether this was a bug in malloc(3) or in array indexing code). As of ORCA/C v2.1.x, this bug appears to be fixed, so the limit was lifted. A couple of calls to lseek(2) didn't have their return values checked for errors. Fixed. Updated email address for Devin Reade. --- usr.orca.bin/describe/README | 20 ++++++++++++++++---- usr.orca.bin/describe/desc.h | 4 ++-- usr.orca.bin/describe/descc.8 | 8 ++++---- usr.orca.bin/describe/descc.desc | 4 ++-- usr.orca.bin/describe/descc.rez | 6 +++--- usr.orca.bin/describe/describe.1 | 6 +++--- usr.orca.bin/describe/describe.desc | 4 ++-- usr.orca.bin/describe/describe.rez | 6 +++--- usr.orca.bin/describe/descu.8 | 8 ++++---- usr.orca.bin/describe/descu.c | 12 ++++-------- usr.orca.bin/describe/descu.desc | 6 +++--- usr.orca.bin/describe/descu.rez | 10 +++++----- 12 files changed, 51 insertions(+), 43 deletions(-) diff --git a/usr.orca.bin/describe/README b/usr.orca.bin/describe/README index 99ae0e1..8cfe2fb 100644 --- a/usr.orca.bin/describe/README +++ b/usr.orca.bin/describe/README @@ -1,7 +1,7 @@ -$Id: README,v 1.7 1998/01/17 07:20:06 gdr Exp $ +$Id: README,v 1.8 1998/02/07 06:39:53 gdr-ftp Exp $ This is the README file for the describe package. This package is -designated as version 1.0.5, and consists of the following utilities: +designated as version 1.0.6, and consists of the following utilities: describe - show database entries describing the current status of programs @@ -64,7 +64,7 @@ and descu.8. I briefly pondered having a describe.5, but alas I was too lazy; you can find the file formats as part of descc.8. Devin Reade -gdr@myrias.ab.ca +gdr@trenco.gno.org INSTALLATION ============ @@ -131,6 +131,17 @@ CHANGES This details changes to the entire distribution. +v1.0.6 February 1998 + There used to be a limit of 65k on the size of the describe + database source when using descu. This limit was imposed + due to a bug in ORCA/C (it is no longer clear whether + this was a bug in malloc(3) or in array indexing code). + As of ORCA/C v2.1.x, this bug appears to be fixed, so + the limit was lifted. + A couple of calls to lseek(2) didn't have their return values + checked for errors. Fixed. + Updated email address for Devin Reade. + v1.0.5 January 1998 Increased the number of characters in the name field of the nameEntry struct from 34 to 36. This gives an 8-byte @@ -203,7 +214,8 @@ written by James Brookes . The descu utility was written by Devin Reade. The following people have performed updates as listed: - v1.0.5 Devin Reade + v1.0.6 Devin Reade + v1.0.5 Devin Reade v1.0.4 Devin Reade v1.03 Soenke Behrens v1.02 Soenke Behrens diff --git a/usr.orca.bin/describe/desc.h b/usr.orca.bin/describe/desc.h index 12f4f87..bd31115 100644 --- a/usr.orca.bin/describe/desc.h +++ b/usr.orca.bin/describe/desc.h @@ -2,14 +2,14 @@ * Header file for the describe package. This file is * used by describe(1), descc(8), and descu(8). * - * $Id: desc.h,v 1.6 1998/01/17 07:20:06 gdr Exp $ + * $Id: desc.h,v 1.7 1998/02/07 06:39:55 gdr-ftp Exp $ */ /* * Keep these utilities in lockstep. Don't forget to change the version * number in the *.rez files and in the manual pages. */ -#define _VERSION_ "v1.0.5" +#define _VERSION_ "v1.0.6" #define QUOTE_CHAR '#' #define DATABASE "/usr/lib/describe.db" diff --git a/usr.orca.bin/describe/descc.8 b/usr.orca.bin/describe/descc.8 index 1ab8001..51dbbb7 100644 --- a/usr.orca.bin/describe/descc.8 +++ b/usr.orca.bin/describe/descc.8 @@ -1,7 +1,7 @@ .\" -.\" $Id: descc.8,v 1.6 1998/01/17 07:20:07 gdr Exp $ +.\" $Id: descc.8,v 1.7 1998/02/07 06:39:57 gdr-ftp Exp $ .\" -.TH DESCC 8 "22 September 1997" GNO "System Administration" +.TH DESCC 8 "6 February 1998" GNO "System Administration" .SH NAME descc \- the describe(1) source compiler .SH SYNOPSIS @@ -13,7 +13,7 @@ descc \- the describe(1) source compiler .SH DESCRIPTION This manual page documents .BR descc -version 1.0.5. +version 1.0.6. .LP .BR descc compiles the describe source file @@ -55,7 +55,7 @@ a complete record: .nf Name: describe -Version: 1.0.5 +Version: 1.0.6 Shell: GNO, ORCA/Shell Author: James Brookes Contact: jamesb@ecst.csuchico.edu diff --git a/usr.orca.bin/describe/descc.desc b/usr.orca.bin/describe/descc.desc index 676f56a..83f007f 100644 --- a/usr.orca.bin/describe/descc.desc +++ b/usr.orca.bin/describe/descc.desc @@ -1,9 +1,9 @@ Name: descc -Version: 1.0.5 +Version: 1.0.6 Shell: ORCA/Shell, GNO/ME Author: James Brookes Contact: jamesb@ecst.csuchico.edu Where: /usr/sbin -FTP: apple2.caltech.edu, ground.isca.uiowa.edu, trenco.myrias.com +FTP: ftp.gno.org Compile a source file into a 'describe' database file. diff --git a/usr.orca.bin/describe/descc.rez b/usr.orca.bin/describe/descc.rez index d9fdd59..692d049 100644 --- a/usr.orca.bin/describe/descc.rez +++ b/usr.orca.bin/describe/descc.rez @@ -1,7 +1,7 @@ /* * Resources for version and comment * - * $Id: descc.rez,v 1.2 1998/01/17 07:20:07 gdr Exp $ + * $Id: descc.rez,v 1.3 1998/02/07 06:39:59 gdr-ftp Exp $ */ #include "Types.rez" @@ -14,7 +14,7 @@ * Version */ resource rVersion (1, purgeable3) { - { 1, 0, 5, /* Version 1.0.5 */ + { 1, 0, 6, /* Version */ release, /* development|alpha|beta|final|release */ 0 }, /* non-final release number */ verUS, /* Country */ @@ -26,7 +26,7 @@ resource rVersion (1, purgeable3) { * Comment */ resource rComment (1, purgeable3) { - PROG " v1.0.4\n" + PROG " v1.0.6\n" DESC " (GNO) \n" AUTHOR }; diff --git a/usr.orca.bin/describe/describe.1 b/usr.orca.bin/describe/describe.1 index b8e08ff..afcf9a7 100644 --- a/usr.orca.bin/describe/describe.1 +++ b/usr.orca.bin/describe/describe.1 @@ -1,7 +1,7 @@ .\" -.\" $Id: describe.1,v 1.6 1998/01/17 07:20:07 gdr Exp $ +.\" $Id: describe.1,v 1.7 1998/02/07 06:40:00 gdr-ftp Exp $ .\" -.TH DESCRIBE 1 "22 September 1997" GNO "Commands and Applications" +.TH DESCRIBE 1 "6 February 1998" GNO "Commands and Applications" .SH NAME describe \- show information about a program .SH SYNOPSIS @@ -13,7 +13,7 @@ describe \- show information about a program .SH DESCRIPTION This manual page documents .BR describe -version 1.0.5. +version 1.0.6. .LP .BR describe will show current information about diff --git a/usr.orca.bin/describe/describe.desc b/usr.orca.bin/describe/describe.desc index 7099266..8972672 100644 --- a/usr.orca.bin/describe/describe.desc +++ b/usr.orca.bin/describe/describe.desc @@ -1,10 +1,10 @@ Name: describe -Version: 1.0.5 +Version: 1.0.6 Shell: ORCA/Shell, GNO/ME Author: James Brookes Contact: jamesb@ecst.csuchico.edu Where: /usr/bin -FTP: apple2.caltech.edu, ground.isca.uiowa.edu, trenco.myrias.com +FTP: ftp.gno.org Print a multi-line description obtained from the compiled 'describe' database; giving utility name, version, intended shell, author, author's diff --git a/usr.orca.bin/describe/describe.rez b/usr.orca.bin/describe/describe.rez index 3f9b5cd..ed7daf8 100644 --- a/usr.orca.bin/describe/describe.rez +++ b/usr.orca.bin/describe/describe.rez @@ -1,7 +1,7 @@ /* * Resources for version and comment * - * $Id: describe.rez,v 1.2 1998/01/17 07:20:07 gdr Exp $ + * $Id: describe.rez,v 1.3 1998/02/07 06:40:05 gdr-ftp Exp $ */ #include "Types.rez" @@ -14,7 +14,7 @@ * Version */ resource rVersion (1, purgeable3) { - { 1, 0, 5, /* Version 1.0.5 */ + { 1, 0, 6, /* Version */ release, /* development|alpha|beta|final|release */ 0 }, /* non-final release number */ verUS, /* Country */ @@ -26,7 +26,7 @@ resource rVersion (1, purgeable3) { * Comment */ resource rComment (1, purgeable3) { - PROG " v1.0.5\n" + PROG " v1.0.6\n" DESC " (GNO) \n" AUTHOR }; diff --git a/usr.orca.bin/describe/descu.8 b/usr.orca.bin/describe/descu.8 index 47cacf4..f4e97f2 100644 --- a/usr.orca.bin/describe/descu.8 +++ b/usr.orca.bin/describe/descu.8 @@ -1,7 +1,7 @@ .\" -.\" $Id: descu.8,v 1.6 1998/01/17 07:20:07 gdr Exp $ +.\" $Id: descu.8,v 1.7 1998/02/07 06:40:07 gdr-ftp Exp $ .\" -.TH DESCU 8 "22 September 1997" GNO "System Administration" +.TH DESCU 8 "6 February 1998" GNO "System Administration" .SH NAME descu \- the describe(1) source updater .SH SYNOPSIS @@ -20,7 +20,7 @@ descu \- the describe(1) source updater .SH DESCRIPTION This manual page documents .BR descu -version 1.0.5. +version 1.0.6. .LP .BR descu updates the describe source file @@ -69,7 +69,7 @@ rather than stdout. .IP \fB-V\fR Show version information. .SH AUTHOR -Devin Reade +Devin Reade .SH HISTORY .BR descu was incorporated into the GNO base distribution as of version 1.0.4 diff --git a/usr.orca.bin/describe/descu.c b/usr.orca.bin/describe/descu.c index 73aec0c..d52267d 100644 --- a/usr.orca.bin/describe/descu.c +++ b/usr.orca.bin/describe/descu.c @@ -11,7 +11,7 @@ * Copyright 1995-1997 by Devin Reade for James Brookes' describe(1) utility. * See the included README file and man page for details. * - * $Id: descu.c,v 1.7 1998/01/17 07:20:07 gdr Exp $ + * $Id: descu.c,v 1.8 1998/02/07 06:40:08 gdr-ftp Exp $ */ #include @@ -30,7 +30,6 @@ #endif #include "desc.h" -#define MAX_BUFFER 65534 #define SLOTS_QUANTUM 64 #define REJECT_FILE "descu.rej" @@ -84,13 +83,10 @@ inhale (char *pathname) { /* create the buffer */ bytecount = lseek(fd,(off_t) 0,SEEK_END); - if (bytecount > MAX_BUFFER) { - fprintf(stderr,"descu internal error: cannot handle files greater " - "than %d bytes\n due to a compiler bug. Sorry.\n", - MAX_BUFFER); - exit(-1); + if ((bytecount == -1) || (lseek(fd,(off_t) 0, SEEK_SET) == -1)) { + perror("lseek failed"); + exit(1); } - lseek(fd,(off_t) 0, SEEK_SET); if ((buffer = malloc(bytecount+1))==NULL) { fprintf(stderr,"error: malloc of %ld-byte buffer failed for file %s:%s\n", bytecount+1,pathname,strerror(errno)); diff --git a/usr.orca.bin/describe/descu.desc b/usr.orca.bin/describe/descu.desc index cf87cd2..ae4488f 100644 --- a/usr.orca.bin/describe/descu.desc +++ b/usr.orca.bin/describe/descu.desc @@ -1,9 +1,9 @@ Name: descu -Version: 1.0.5 +Version: 1.0.6 Shell: ORCA/Shell, GNO/ME Author: Devin Reade -Contact: gdr@myrias.ab.ca +Contact: gdr@trenco.gno.org Where: /usr/sbin -FTP: apple2.caltech.edu, ground.isca.uiowa.edu, trenco.myrias.com +FTP: ftp.gno.org Update a 'describe' source file. diff --git a/usr.orca.bin/describe/descu.rez b/usr.orca.bin/describe/descu.rez index 9cac8fa..48dc924 100644 --- a/usr.orca.bin/describe/descu.rez +++ b/usr.orca.bin/describe/descu.rez @@ -1,20 +1,20 @@ /* * Resources for version and comment * - * $Id: descu.rez,v 1.2 1998/01/17 07:20:07 gdr Exp $ + * $Id: descu.rez,v 1.3 1998/02/07 06:40:11 gdr-ftp Exp $ */ #include "Types.rez" /* Don't forget to update the version numbers, below (two places) */ #define PROG "descu" -#define DESC "describe(1) source updater" -#define AUTHOR "Author: Devin Reade " +#define DESC "describe(1) source update utility" +#define AUTHOR "Author: Devin Reade " /* * Version */ resource rVersion (1, purgeable3) { - { 1, 0, 5, /* Version 1.0.5 */ + { 1, 0, 6, /* Version */ release, /* development|alpha|beta|final|release */ 0 }, /* non-final release number */ verUS, /* Country */ @@ -26,7 +26,7 @@ resource rVersion (1, purgeable3) { * Comment */ resource rComment (1, purgeable3) { - PROG " v1.0.5\n" + PROG " v1.0.6\n" DESC " (GNO) \n" AUTHOR };