First beta version of describe v1.0.3 sent out by Soenke on 28 Jan 95.

Main changes include:
	searches are now case insensitive
	Lexicographic order in the database was incorrect; if two
	   keywords matched in the first N chars, the wrong entry
	   may be returned.
	Added a va_end() function since it is used by GNO open(2)
	   and Orca/C v2.0.4b now declares that as a macro.
This commit is contained in:
gdr 1996-01-28 17:39:31 +00:00
parent a40ac0f34c
commit 5ab0aa962f
13 changed files with 257 additions and 109 deletions

View File

@ -1,14 +1,14 @@
$Id: README,v 1.2 1996/01/22 02:40:43 gdr Exp $
$Id: README,v 1.3 1996/01/28 17:39:22 gdr Exp $
This is the README file for the describe package. This package is
designated as version 1.0.2, and consists of the following utilities:
designated as version 1.0.3, and consists of the following utilities:
describe v1.0.2 - show database entries describing the current
describe v1.0.3 - show database entries describing the current
status of programs
descc v1.0.2 - the describe source compiler
descc v1.0.3 - the describe source compiler
descu v1.0.2 - the describe source updater
descu v1.0.3 - the describe source updater
ABOUT DESCRIBE AND DESCC
========================
@ -82,6 +82,11 @@ CHANGES
This details changes to the entire distribution.
v1.03 January 1996
descu now sorts entries correctly (longer entries
ended up before shorter ones with 1.0.2, i.e. "calls"
came before "cal")
v1.02 October 1995
descc now circumvents a bug in ORCA/C's ftell() function.
describe can now find entries that are not all lower-case.
@ -117,7 +122,7 @@ written by James Brookes <jamesb@ecst.csuchico.edu>.
The descu utility and v1.01 modifications to describe and descc were by
Devin Reade <gdr@myrias.ab.ca>.
v1.02 modifications to describe, descc and descu were by Soenke Behrens
v1.02/1.03 modifications to describe, descc and descu were by Soenke Behrens
<sbehrens@contech.demon.co.uk>.
LEGALESE

View File

@ -1,4 +1,4 @@
.TH DESCC 8 "System Administration" "7 May 1995" "Version 1.0.2"
.TH DESCC 8 "System Administration" "7 May 1995" "Version 1.0.3"
.SH NAME
descc \- the describe(1) source compiler
.SH SYNOPSIS
@ -40,7 +40,7 @@ a complete record:
.nf
Name: describe
Version: 1.0.2
Version: 1.0.3
Shell: ORCA/Shell, GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu

View File

@ -1,6 +1,10 @@
/* */
/* descc - compile info file into describe database file */
/* */
/* v1.0.3 - No changes, but changed version number to keep */
/* in line with descu. */
/* Soenke Behrens [Sun Jan 28 1996] */
/* */
/* v1.0.2 - One bug removed. Recompiled to accomodate new */
/* SHELL line and DESCDB environment var */
/* Soenke Behrens [Sun Oct 22 1995] */
@ -42,7 +46,7 @@
#include <assert.h>
#include "desc.h"
#define _VERSION_ "v1.0.2"
#define _VERSION_ "v1.0.3"
/* prototypes */
@ -50,6 +54,7 @@ void usage(char *callname);
void version(char *callname);
void puke(int error,int lines);
int mygets(char *buffer, int2 *lines, FILE *FInPtr);
char *strdup (const char *str);
int Vflag;

View File

@ -1,5 +1,5 @@
Name: descc
Version: 1.0.2
Version: 1.0.3
Shell: ORCA/Shell, GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu

View File

@ -1,4 +1,4 @@
.TH DESCRIBE 1 "Commands and Applications" "7 May 1995" "Version 1.0.2"
.TH DESCRIBE 1 "Commands and Applications" "7 May 1995" "Version 1.0.3"
.SH NAME
describe \- show information about a program
.SH SYNOPSIS

View File

@ -16,13 +16,14 @@
#include <getopt.h>
#include "desc.h"
#define _VERSION_ "v1.0.2"
#define _VERSION_ "v1.0.3"
/* prototypes */
void usage(char *callname);
void print_entry(FILE *FInPtr, long int index);
void myprintf(char *string, int wordwrap_size);
char *strdup (const char *str);
int Vflag;

View File

@ -1,5 +1,5 @@
Name: describe
Version: 1.0.2
Version: 1.0.3
Shell: ORCA/Shell, GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
@ -10,4 +10,3 @@ FTP: ftp.cco.caltech.edu
database; giving utility name, version, intended shell, author, author's
contact, where the utility is, as well as where the utility can be FTPd
from on the InterNet.

View File

@ -1,5 +1,6 @@
#=============================================================================
# List of shell applications for GNO/ME Last revision: 22 Oct 95
# List of shell applications for GNO/ME and ORCA/Shell
# Last revision: 28 Jan 96
#=============================================================================
#
# About this file
@ -21,15 +22,12 @@
#
# Online home of describe
# ~~~~~~~~~~~~~~~~~~~~~~~
# http://www.webzone1.co.uk/www/thesonkpage/describe.htm
# http://webzone1.co.uk/www/thesonkpage/describe.htm
# ftp://ftp.cco.caltech.edu/pub/apple2/shellutils/
#
# Updates and corrections may be submitted through the web page,
# or sent by email to sbehrens@contech.demon.co.uk.
#
# If you have trouble connecting to www.webzone1.co.uk,
# try webzone1.co.uk or 194.72.60.96.
#
# To obtain the version number of a file:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# A) use the shell program `getvers',
@ -40,6 +38,17 @@
# actually mean the original author of the program.
#==============================================================================
Name: apropos
Version: 3.0 (24 Jul 95)
Shell: GNO/ME
Author: Devin Reade
Contact: gdr@myrias.com
Where: /usr/bin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Locate commands by keyword. Bundled with catman, makewhatis, man,
and whatis in the manpack30.shk archive.
Name: argv0
Version: 1.0
Shell: GNO/ME
@ -63,6 +72,16 @@ FTP: ...
most options--including underline, boldface, margins, centering--on all
terminal types.
Name: awk
Version: 1.0
Shell: GNO/ME
Author: Ported by Jawaid Bazyar
Contact: bazyar@netcom.com
Where: /usr/local/bin
FTP: grind.isca.uiowa.edu
A port of AT&T's AWK string processing language.
Name: bc
Version: 1.01
Shell: GNO/ME
@ -118,6 +137,16 @@ FTP: ftp://ftp.cco.caltech.edu/pub/apple2/shellutils
Unpacks files that were packed with Zoo 2.1 or earlier.
Name: cal
Version: x
Shell: GNO/ME
Author: Phillip Vandry
Contact: vandry@CAM.ORG
Where: /usr/bin
FTP:
Prints a calendar for the current month or any month.
Name: calls
Version: 2.0 (16 Dec 93)
Shell: GNO/ME
@ -130,15 +159,16 @@ FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu.
functions within a program. It's more flexible than Orca shell version.
Requires cpp.
Name: cal
Version: x
Name: catman
Version: 1.0 (24 Jul 95)
Shell: GNO/ME
Author: Phillip Vandry
Contact: vandry@CAM.ORG
Where: /usr/bin
FTP:
Author: Devin Reade
Contact: gdr@myrias.com
Where: /usr/sbin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Prints a calendar for the current month or any month.
Preformat manual reference pages. Bundled with apropos,
makewhatis, man, and whatis in the manpack30.shk archive.
Name: cclean
Version: 1.02
@ -174,15 +204,17 @@ FTP: ...
for replies, etc..
Name: chmod
Version: 1.0
Version: 2.1
Shell: GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
Author: Leslie M. Barstow III
Contact: wdphoenix@delphi.com
Where: /bin
FTP: ...
FTP: grind.isca.uiowa.edu
chmod allows the user to modify file permissions on a particular file;
including the read, write, destroy, backup, and invisible bits.
chmod allows you to change the permissions on a file. This is an
enhanced version which allows you to change options ala UNIX or using
the Apple specific flags (UNIX values are translated into Apple
equivalents).
Name: copycat
Version: 1.4.1
@ -215,6 +247,16 @@ FTP:
A simple dialup utility.
Name: cut
Version: 1.0
Shell: GNO/ME
Author: Jason Perez
Contact: jperez@ee.tamu.edu
Where: /usr/local/bin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Cuts out selected fields of each line of a file.
Name: date
Version: 1.2
Shell: GNO/ME
@ -226,7 +268,7 @@ FTP: ...
Shows the date and time (optionally, continuously).
Name: descc
Version: 1.0.2
Version: 1.0.3
Shell: ORCA/Shell, GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
@ -236,7 +278,7 @@ FTP: ftp.cco.caltech.edu
Compile a source file into a 'describe' database file.
Name: describe
Version: 1.0.2
Version: 1.0.3
Shell: ORCA/Shell, GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
@ -249,7 +291,7 @@ contact, where the utility is, as well as where the utility can be FTPd
from on the InterNet.
Name: descu
Version: 1.0.2
Version: 1.0.3
Shell: ORCA/Shell, GNO/ME
Author: Devin Reade
Contact: gdr@myrias.ab.ca
@ -258,16 +300,6 @@ FTP: ftp.cco.caltech.edu
Update a 'describe' source file.
Name: dialup
Version: 1.1
Shell: GNO/ME
Author: Phillip Vandry
Contact: vandry@CAM.ORG
Where: /usr/sbin
FTP: ...
Run from inittab to handle modems on dialup lines.
Name: dial
Version: 1.0
Shell: GNO/ME
@ -279,6 +311,26 @@ FTP: ...
Uses your modem to dial telephone numbers stored in a database by name,
or looks up the numbers and reports without dialing.
Name: dialup
Version: 1.1
Shell: GNO/ME
Author: Phillip Vandry
Contact: vandry@CAM.ORG
Where: /usr/sbin
FTP: ...
Run from inittab to handle modems on dialup lines.
Name: diff
Version: 1.0 (12 Dec 94)
Author: Ported by Devin Reade
Contact: <gdr@myrias.ab.ca>
Where: /usr/bin
FTP: cco.caltech.edu, grind.isca.uiowa.edu.
Show differences in files. This is a port based on GNU diff v2.6. Some
less-used features have been temporarily disabled for v1.0.
Name: dmake
Version: 1.0 (4 Jul 94)
Shell: GNO/ME
@ -343,6 +395,16 @@ FTP:
Evaluates matehmatical expressions; prints result in normal and
scientific notation. Uses C like syntax.
Name: figlet
Version: 2.0
Shell: GNO/ME
Author: Ported by Jawaid Bazyar
Contact: bazyar@csn.org
Where: /usr/local/bin
FTP: grind.isca.uiowa.edu
Creates styled large characters out of ordinary screen characters.
Name: finger
Version: 1.1
Shell: GNO/ME
@ -426,6 +488,16 @@ FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
GNU zip -- compress or expand files. Ported from the Free Software
Foundation's gzip. Also has functionality of gunzip and gzcat.
Name: init
Version: 1.0
Shell: GNO/ME
Author: Phillip Vandry
Contact: vandry@CAM.ORG
Where: /usr/bin
FTP: ...
Sends commands to the init daemon.
Name: initd
Version: 1.4
Shell: GNO/ME
@ -437,16 +509,6 @@ FTP: ...
Starts and kills processes, maintains the system run level, and runs
syslogd (log daemon)
Name: init
Version: 1.0
Shell: GNO/ME
Author: Phillip Vandry
Contact: vandry@CAM.ORG
Where: /usr/bin
FTP: ...
Sends commands to the init daemon.
Name: joinpara
Version: 1.0 (16 Dec 93)
Shell: GNO/ME
@ -504,6 +566,17 @@ FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Generates the whatis database used by apropos(1) and whatis(1).
Name: man
Version: 3.0 (24 Jul 95)
Shell: GNO/ME
Author: Devin Reade
Contact: gdr@myrias.com
Where: /usr/bin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Display manual reference pages. Bundled with apropos, catman,
makewhatis, and whatis in the manpack30.shk archive.
Name: martian
Version: 1.0
Shell: GNO/ME
@ -577,17 +650,6 @@ FTP: ftp://ftp.cco.caltech.edu/pub/apple2/shellutils/
Merges a FIDO nodediff into a FIDO nodelist
Name: newuserv
Version: 1.0
Shell: GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
Where: /usr/sbin
FTP: ...
Create a home directory with basic gshrc for new user, and add user
to /var/adm/newuser/newusers file for validation by the system operator.
Name: newuser
Version: 1.0
Shell: GNO/ME
@ -599,6 +661,17 @@ FTP: ...
Create a home directory with basic gshrc for a new user, and add user
into /etc/passwd file for immediate access.
Name: newuserv
Version: 1.0
Shell: GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
Where: /usr/sbin
FTP: ...
Create a home directory with basic gshrc for new user, and add user
to /var/adm/newuser/newusers file for validation by the system operator.
Name: occ
Version: 1.13
Shell: ORCA/Shell, GNO/ME
@ -621,6 +694,27 @@ FTP: ...
Shows the current process or a specified process and climbs up to the top
level process.
Name: patch
Version: 1.0 (12 Nov 95)
Shell: GNO/ME
Author: Ported by Devin Reade.
Contact: gdr@myrias.com
Where: /usr/bin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Apply diffs to an original file. This is based on BSD patch v2.0pl12u8.
Name: pbmtoiw
Version: 1.0
Shell: GNO/ME
Author: Thomas Okken
Contact: thomas@animal.hobby.nl, tommasso@hacktic.nl
Where: /usr/bin
FTP: grind.isca.uiowa.edu
Reads a portable bitmap and converts it to graphics codes for the
Apple Imagewriter printer.
Name: phone
Version: 1.0.1
Shell: GNO/ME
@ -662,6 +756,17 @@ FTP: ftp://ftp.cco.caltech.edu/pub/apple2/shellutils
Creates random names by a set of certain rules.
Name: rot13
Version: 1.0
Shell: ORCA/Shell, GNO/ME
Author: Leslie M. Barstow III
Contact: wdphoenix@delphi.com
Where: /usr/local/bin
FTP: grind.isca.uiowa.edu
rot13 allows you to encrypt and decrypt rot13 text, which is usually
used in Usenet News to hide spoilers and provocative material.
Name: rsound
Version: 1.1a
Shell: GNO/ME
@ -814,6 +919,17 @@ FTP: ftp://ftp.cco.caltech.edu/pub/apple2/shellutils/
Uncompresses PowerPacker(tm) documents, which are created by them Amigoids.
Name: uptime
Version: 1.0
Shell: GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
Where: /usr/bin
FTP: ...
Reports the time, amount of time the system has been up, number of
users, and system load averages for the last 1, 5, and 15 minutes.
Name: uptimed
Version: 1.0
Shell: GNO/ME
@ -825,16 +941,26 @@ FTP: ...
Keeps track of system load averages for the uptime utility over the last
1, 5 and 15 minutes.
Name: uptime
Name: wall
Version: 1.0
Shell: GNO/ME
Author: James Brookes
Contact: jamesb@ecst.csuchico.edu
Author: Phil Vandry
Contact: vandry@CAM.ORG
Where: /usr/bin
FTP: ...
Reports the time, amount of time the system has been up, number of
users, and system load averages for the last 1, 5, and 15 minutes.
Sends a message to the terminal of every logged on user.
Name: whatis
Version: 3.0 (24 Jul 95)
Shell: GNO/ME
Author: Devin Reade
Contact: gdr@myrias.com
Where: /usr/bin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Locate commands by name. Bundled with apropos, catman, makewhatis,
and man in the manpack30.shk archive.
Name: whereis
Version: v1.1 (2 Jan 93)
@ -910,7 +1036,8 @@ Author: Dave J. Roberts
Contact: dave@mary.iia.org
Where: /usr/X/bin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
Graphical login prompt for GNO/ME, X11-style
Name: zsh
Version: 2.0
@ -922,3 +1049,8 @@ FTP:
zsh is a program used to put a user's account in suspension.
It prints a message and then exits.

View File

@ -1,4 +1,4 @@
.TH DESCU 8 "System Administration" "7 May 1995" "Version 1.0.2"
.TH DESCU 8 "System Administration" "7 May 1995" "Version 1.0.3"
.SH NAME
descu \- the describe(1) source updater
.SH SYNOPSIS

View File

@ -10,7 +10,7 @@
* Copyright 1995 by Devin Reade for James Brookes' describe(1) utility.
* See the included README file and man page for details.
*
* $Id: descu.c,v 1.2 1996/01/22 02:40:49 gdr Exp $
* $Id: descu.c,v 1.3 1996/01/28 17:39:29 gdr Exp $
*/
#pragma optimize -1
@ -28,7 +28,7 @@
#include <getopt.h>
#include "desc.h"
#define _VERSION_ "v1.0.2"
#define _VERSION_ "v1.0.3"
#define MAX_BUFFER 65534
#define SLOTS_QUANTUM 20
#define REJECT_FILE "descu.rej"
@ -315,15 +315,15 @@ int my_stricmp (const char *cs, const char *ct)
if (a > b) return 1;
cs++; ct++;
}
if (*cs == *ct) return 0;
else if (*cs) return -1;
else return 1;
if (*cs == *ct) return 0; /* cs and ct of same length */
else if (*cs) return 1; /* cs longer than ct */
else return -1; /* cs shorter than ct */
}
/*
* ns_strcmp (no-space string compare) -- compare two strings, ignoring
* a leading NAME_SHORT and whitespace, and ignoring trailing
* whitespace.
* ns_stricmp (no-space string compare) -- compare two strings
* case-insensitive, ignoring a leading NAME_SHORT and whitespace,
* and ignoring trailing whitespace.
*
* Returns zero if strings are equal, -1 if a<b, 1 if a>b.
* The following are therefore equal:
@ -331,13 +331,14 @@ int my_stricmp (const char *cs, const char *ct)
* "Name: test "
* The following are inequal:
* "Name: one"
* "Name: One"
* "Name: two"
*/
int ns_strcmp (char *a, char *b) {
int ns_stricmp (char *a, char *b) {
char *p;
char ca, cb;
size_t len;
/* strip NAME_SHORT and leading space */
len = strlen(NAME_SHORT);
a+=len;
@ -359,14 +360,14 @@ int ns_strcmp (char *a, char *b) {
*(p+1) = '\0';
/* do the string comparison */
while (*a && *b) {
if (*a < *b) return -1;
if (*a > *b) return 1;
while ((ca = tolower(*a)) && (cb = tolower(*b))) {
if (ca < cb) return -1;
if (ca > cb) return 1;
a++; b++;
}
if (*a == *b) return 0;
else if (*a) return -1;
else return 1;
if (*a == *b) return 0; /* a and b of same length */
else if (*a) return 1; /* a longer than b */
else return -1; /* a shorter than b */
}
@ -480,7 +481,7 @@ int main(int argc, char **argv) {
/* first stage; merge while we have two arrays */
while ((i<array1SlotsUsed) && (j<array2SlotsUsed)) {
compare = ns_strcmp (entryArray1[i]->name, entryArray2[j]->name);
compare = ns_stricmp (entryArray1[i]->name, entryArray2[j]->name);
if (compare < 0) {
fprintf(outfp,"%s\n%s\n",entryArray1[i]->name,entryArray1[i]->data);
i++;

View File

@ -1,5 +1,5 @@
Name: descu
Version: 1.0.2
Version: 1.0.3
Shell: ORCA/Shell, GNO/ME
Author: Devin Reade
Contact: gdr@myrias.ab.ca

View File

@ -5,9 +5,9 @@
# Use -DSTACK_CHECK in CFLAGS to show stack usage.
CFLAGS += -O -w -v -I/usr/include -s768
CFLAGS += -O -v -I/usr/include -s768
LDFLAGS += -v
LDLIBS += -l/usr/lib/lgetopt -l/usr/lib/stack
LDLIBS +=
BINDIR = /usr/local/bin
SBINDIR = /usr/sbin
MANDIR = /usr/man
@ -17,30 +17,22 @@ build: describe descc descu
descc: descc.o basename.o descc.r
@purge
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS)
$(CC) $(LDFLAGS) descc.o basename.o -o $@ $(LDLIBS)
copyfork descc.r descc
describe: describe.o basename.o describe.r
@purge
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS)
$(CC) $(LDFLAGS) describe.o basename.o -o $@ $(LDLIBS)
copyfork describe.r describe
descu: descu.o basename.o descu.r
descu: descu.o basename.o vaend.o descu.r
@purge
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS)
$(CC) $(LDFLAGS) descu.o basename.o vaend.o -o $@ $(LDLIBS)
copyfork descu.r descu
basename.o: basename.c
$(CC) -c $(CFLAGS) basename.c
descc.o: descc.c desc.h
$(CC) -c $(CFLAGS) descc.c
describe.o: describe.c desc.h
$(CC) -c $(CFLAGS) describe.c
descu.o: descu.c desc.h
$(CC) -c $(CFLAGS) descu.c
descc.o:: desc.h
describe.o:: desc.h
descu.o:: desc.h
install:
$(RM) -f /usr/local/bin/descc

View File

@ -0,0 +1,13 @@
/*
* Work around a change in the ORCA/C libraries: function va_end
* is now __va_end, which breaks some GNO/ME libraries.
*/
#include <stdarg.h>
#undef va_end
void va_end (va_list ap)
{
__va_end (ap);
}