Compare commits

...

470 Commits

Author SHA1 Message Date
Devin Reade
2b1afe29bf Merge pull request #6 from ksherlock/master
sysexits.h header
2012-09-09 11:34:29 -07:00
Kelvin Sherlock
44d6501ffd sysexits (from FreeBSD 9.0) 2012-09-09 13:37:43 -04:00
Devin Reade
44ab20dfb9 Merge pull request #5 from ksherlock/ftp-update
ftp passive mode
2012-09-08 15:44:32 -07:00
Devin Reade
8e8cb4800f Merge pull request #4 from ksherlock/tmterm-login
/bin/login tmterm compatibility
2012-09-08 15:43:14 -07:00
Kelvin Sherlock
4d5d42f859 actual passive support 2012-09-08 17:27:49 -04:00
Kelvin Sherlock
7666e5ed8b add passive mode option 2012-09-08 17:26:48 -04:00
Kelvin Sherlock
faef86c362 add lpwd command 2012-09-08 17:08:22 -04:00
Kelvin Sherlock
b5dc0fa710 add togglevar for options. 2012-09-08 16:59:25 -04:00
Kelvin Sherlock
0e5947fff1 Merge branch 'tmterm-login' of https://github.com/ksherlock/gno into tmterm-login 2012-09-08 16:44:27 -04:00
Kelvin Sherlock
7be95f5f1b compatability with m/u update login 2012-09-08 14:56:54 -04:00
Devin Reade
54a632e410 Merge pull request #3 from ksherlock/master
pull test
2012-09-03 10:46:38 -07:00
Kelvin Sherlock
be00396c26 add newline at end 2012-09-03 13:42:45 -04:00
Devin Reade
a5d25d1c6e Merge pull request #2 from ksherlock/master
/etc/services
2012-09-03 10:23:26 -07:00
Kelvin Sherlock
38ea34b864 compatability with m/u update login 2012-09-03 13:19:30 -04:00
Kelvin Sherlock
ab2be98bb1 add /etc/services file 2012-09-03 13:09:00 -04:00
Kelvin Sherlock
f325d45831 remove debug code from strings(1) 2012-09-02 15:55:14 -04:00
Devin Reade
80b1baffa8 removed comment for commit email test 2012-09-02 11:54:44 -06:00
Devin Reade
d6e93b6a9c another non-substantive comment for testing commit email 2012-09-02 11:54:00 -06:00
Devin Reade
67c6566841 nothing substantive; testing commit email 2012-09-02 11:36:35 -06:00
Devin Reade
a353321531 Removed a couple uses of the cvs Source tag 2012-09-02 11:05:55 -06:00
gdr
0df1477cf9 Before moving to git, checked in a bunch of apparent work-in-progress
files that have been sitting idle for a few years.  Unfortunately
I can't gaurantee at the moment that these even compile let alone build.
Caveat Emptor
2012-08-26 02:55:00 +00:00
gdr
e55fb1c59f reworking doc build 2012-08-26 02:27:36 +00:00
gdr
2ea55d1d9b can use ram disk for gno.boot 2012-08-25 21:53:25 +00:00
gdr
ffe0029aa6 fixing links and build 2012-08-25 07:22:00 +00:00
gdr
cafd46ab01 removed old sgml files 2012-08-25 07:20:40 +00:00
gdr
c0e86cdeba converted gsh manual to docbook 2012-08-25 07:19:03 +00:00
kelvin
61afe2ce33 Fixed buffer overflow bug mentioned in the gupp docs. 2001-06-23 23:55:28 +00:00
gdr
616bf9ab72 Added CVS Id tag. 2001-06-18 13:42:55 +00:00
gdr
32bc13f2d1 made a bunch of links relative vice absolute 2001-06-18 13:35:04 +00:00
gdr
66bcd2e6cb - made links relative
- removed a broken link
2001-06-18 13:34:32 +00:00
tribby
7edb4eac39 Regression tests for gsh. 1999-11-30 20:28:24 +00:00
tribby
769328325f Output files of gsh built-in commands tests, for comparison against
run-time output.
1999-11-30 19:34:56 +00:00
tribby
74f2b97322 Changes for gsh version 2.0a1:
Fix PR#50 while maintaining backward compatibility: when new environment
variable $KEEPQUOTE is set, use the command line's original single and
double quotes unchanged (rather than removing all quotes and adding
double quotes as needed).

Fix PR#123: do not ignore command line characters following a ";" that
was not preceeded by a command.

Add signal handler for SIGTTIN (background read attempted from control
terminal) that prints a message and quits the shell. This is needed
because gsh will sometimes receive such a signal, go into the "suspended"
state, and never return to "running" state.

Add environment variable $ECHOX to print expanded commands before they
are executed.
1999-11-30 17:53:27 +00:00
stever
9aa13dba8f Document the FNM_LEADING_DIR flag. 1999-11-22 07:42:06 +00:00
stever
829bd4787a Added support for testing different flags and multiple strings. 1999-11-22 05:45:57 +00:00
stever
881bc1fec3 Newer upstream FreeBSD version (supports FNM_CASEFOLD and FNM_LEADING_DIR). 1999-11-22 05:43:23 +00:00
stever
bd69a0e25b Newer upstream FreeBSD version (supports FNM_CASEFOLD and FNM_LEADING_DIR).
Fix for PR#136.
1999-11-22 05:41:12 +00:00
gdr-ftp
accedc8b02 Makefile:
added swab.c to build list
1999-09-01 01:02:13 +00:00
gdr-ftp
8cdc379e42 swab.c:
initial checkin
1999-09-01 00:58:23 +00:00
gdr-ftp
111932c451 strftime.3:
initial checkin
1999-07-04 20:58:50 +00:00
gdr-ftp
3e7ce1a5aa swab.3:
submission by Scott Moberley
1999-07-04 19:44:10 +00:00
gdr-ftp
670d10a58d Eliminate the alias "rm" to "cp -p rm" since we now have a real rm. 1999-07-04 19:18:52 +00:00
gdr-ftp
f8d08a8168 updated rm(1) entry from Dave Tribby 1999-07-04 18:56:52 +00:00
gdr-ftp
bd2d8af56a Makefile:
nulib is dumping an extraneous "-^H" to stdout, so dump
	stdout to /dev/null
mkgen, mkindex, view.html:
	added "productivity" as a category
mkindex:
	added a concheck for .index.src entries that aren't using the
	describe(1) info
1999-07-03 16:55:42 +00:00
gdr-ftp
efe58b60ff fixed some email addrs 1999-07-03 14:46:37 +00:00
gdr-ftp
26a4bcf0c5 changed some email addrs 1999-07-03 14:39:19 +00:00
gdr-ftp
aebfb72b92 describe.src:
- updated entries bc, date, dc, and sbc from Scott Moberley
1999-07-03 13:59:26 +00:00
gdr-ftp
8bfb9c1e14 describe.src:
Submissions by Scott Moberly: bc, sbc, dc, rh, ul
1999-06-19 14:12:59 +00:00
gdr-ftp
0e2145d3a6 descc.rez, describe.rez, descu.rez:
The version number in the rVersion resource was wrong.
1999-06-19 14:09:43 +00:00
tribby
e0806f3cbb FreeBSD files modified for GNO, plus additional required support files. 1999-05-27 00:27:20 +00:00
gdr-ftp
46661a883e status.bin:
- updated status for center, edit, rm, newuser, and newuserv
1999-04-29 15:48:51 +00:00
gdr-ftp
e81f8d35e3 Added submissions by Kelvin Sherlock: bcd, bork, caesar, and pom 1999-04-10 15:27:35 +00:00
gdr-ftp
cbbc695df3 describe.src:
- added entries infer, logname, striptex, sun, and texi2roff
	  by Scott Moberly
1999-04-05 19:58:59 +00:00
gdr-ftp
2b9eca4ba0 describe.src:
- added entry for center(1)
mkindex:
	- fix up some entries for the generated index
1999-04-05 19:56:02 +00:00
gdr-ftp
1039b17280 describe.src:
- fix mangled lines caused by bug documented in PR#66
1999-04-05 19:53:45 +00:00
gdr-ftp
07e0f96d2a Minor bug fixes for descu. See PR#66, PR#94, PR#95, and the README
file with the describe source.
1999-04-05 19:47:20 +00:00
gdr-ftp
c1c6594ed0 describe.src:
- added entry for pig(6), submitted by Kelvin Sherlock
1999-03-26 16:32:14 +00:00
gdr-ftp
9c06493506 Makefile:
- added 'install' and 'release' targets
	- added rVersion rez forks to final files
box.asm:
	- added dummy routine that winds up in the *.root file
console.rez, modem.rez, null.rez, printer.rez:
	- initial checkin
1999-03-19 07:18:01 +00:00
gdr-ftp
0ce301a14a Makefile:
- link with *.o rather than *.root to avoid problems on netatalk-
	  served source partitions.  affected err.root box.root, regexp.root
	- create linkmap for debugging purposes
	- added install and release targets
err.asm, regexp.asm
	- added dummy routine so that we can throw away the *.root file.
1999-03-19 07:15:03 +00:00
gdr-ftp
f50f8a7dde moved the definitions of CATREZ, INSTALL, and TMPDIR to <gno/paths.mk>
since so many components depend on them
1999-03-19 05:53:33 +00:00
gdr-ftp
a51e90fa81 Makefile:
- create $(OBJ_DIR) (if it doesn't already exist) before building
	  objects
1999-02-23 04:27:07 +00:00
gdr-ftp
b6e3bbc037 mksgml posthtml:
- initial checkin
Makefile:
	- changes to allow for the new gsh ref manual
	- moved *.Z *.gz files into an "uploads" subdir
README:
	- added some comments re the sgml stuff
head.html, index.html, mkmandex, mkhtmlman, manindex.html, mkstatus,
oldrefs.html, refs.html, tail.html:
	- eliminated <base> tags
	- fully specify page colours
refs.html:
	- added links for new gsh manual
index.html:
	- add dates for "NEW" section
	- added comment about new gsh manual
intro.tex:
	- fully specify page colours
	- fixed a typo:  "2.0.4" --> "2.0.6" in installation notes
kern.tex:
	- fully specify page colours
1999-02-21 23:37:13 +00:00
gdr-ftp
2fd48bf635 .cvsignore:
added 'gsh.sgml' since it's generated
Makefile:
	fixed up some dependencies
main.sgml:
	added top level id so that the created file is named "index.html"
1999-02-21 23:30:39 +00:00
gdr-ftp
5eed4a4a87 gsh user's manual:
- initial checkin.  Only minor changes from the v2.0.4 version.
	  It still needs to be reviewed as to currency.
1999-02-21 18:46:51 +00:00
gdr-ftp
3f5e869b65 Makefile:
- modified for GNO base build
center.c:
	- prototyped functions, general code cleanup
center.1, center.desc, center.rez:
	- initial checkin
1999-02-16 06:04:12 +00:00
gdr-ftp
4d7cc8e5b6 fudgeinstall:
- msort doesn't read stdin.  Use a temporary file instead
	- install support files for newuser(8)
	- install TMTerm, /etc/hosts, /etc/networks, /usr/sbin/slpscrpt.direct
mkboot:
	- create the script /tmp/mklinks on the gno.boot volume.  This
	  script creates the duplicate files that should be symlinks
	  to other programs (newuserv --> newuser, for example).  The
	  script will be run by installboot1
mkdisk1:
	- don't ship /gno/install.  Do ship /gno/Icons and /gno/System
1999-02-15 21:39:11 +00:00
gdr-ftp
61fdf9319e installboot1:
- run the (generated) /tmp/mklinks script so that certain
	  programs are duplicated under different names.  It would be
	  nice to have symlinks instead.
1999-02-15 20:15:34 +00:00
gdr-ftp
85dd2b5e50 describe.src
- updated entries for newuser and newuserv
1999-02-15 20:12:44 +00:00
gdr-ftp
bdeb2998e1 Makefile:
- set debug, optimization level, and stack size appropriately
	  for the released version
	- set HAS_MKSO_DATA and HAS_MKLINK_DATA
1999-02-15 20:11:25 +00:00
gdr-ftp
b88cc47e7f Makefile:
- set HAS_MKLINK_DATA make variable
1999-02-15 19:08:46 +00:00
gdr-ftp
4a6af88951 README.install:
Give url to online namespace(5) manual page.
1999-02-15 18:56:17 +00:00
gdr-ftp
d21ca86166 index.html:
- mention release of 2.0.6
intro.tex:
	- add lots of text about installing 2.0.6 and later.  Some sections
	  are just skeletons at the moment and still need to be written
1999-02-15 18:54:37 +00:00
gdr-ftp
5951e66bf1 directory.3:
- fixed a formatting typo
1999-02-15 01:12:17 +00:00
gdr-ftp
97a871e3dc README.install:
- added TMTerm to the list of desk accs avail.
1999-02-15 01:05:58 +00:00
gdr-ftp
75d157ff30 glogin:
- changed some comments
1999-02-15 01:01:50 +00:00
gdr-ftp
57d250378b gshrc, glogin:
- initial checkin
1999-02-15 01:00:45 +00:00
gdr-ftp
8d36865dc2 newid:
- initial checkin
1999-02-15 01:00:26 +00:00
gdr-ftp
330e74b7e9 Makefile, mklink.data, mkso.data, newuser.desc, newuser.rez:
- initial checkin
README:
	- updated installation notes
installit, newuserv.c:
	- deleted (obsolete)
newuser.1:
	- renamed to newuser.8
newuser.c, newuser.8:
	- account home directories are now made in /home rather than /user
	- made all the routines internal to this file to be class 'static'
	- fit sources into GNO base distribution builds
	- added checks for parsing NEWID_FILE
	- added various conchecks to prevent buffer overflow and similar
	  problems
	- ensure the password is at least MIN_PASSWD_LEN characters long
	- don't set the terminal type; that is the responsibility of
	  initd/getty.
	- instead of creating explicit files in the user's home directory,
	  copy every file that is in the SKELETONS directory.
	- account creation is now logged via syslogd
	- added -g flag for selecting non-default group ids
	- check to ensure that the new uid returned by get_next_uid is
	  not already in use; if it is, then log a warning via syslog,
	  skip it, and get another uid
1999-02-15 00:22:11 +00:00
gdr-ftp
5ffbafc1b5 sys/stat.h:
- missed a dependency on <sys/types.h>
1999-02-14 07:19:59 +00:00
gdr-ftp
68d2224e5b newuser.c:
reformatted source; no substantive changes
1999-02-14 00:05:23 +00:00
gdr-ftp
d9d4770f9f namespace.5, resolver.5:
- initial checkin
1999-02-13 19:56:16 +00:00
gdr-ftp
ba2ef9169c kill.1:
- fixed minor formatting problem
1999-02-13 19:53:47 +00:00
gdr-ftp
62c04cd62d slpscrpt.direct:
- initial checkin of direct-connect login script
1999-02-13 06:48:57 +00:00
gdr-ftp
355ed669c5 inittab:
Added entries to initialize serial ports.  (initially commented out)
hosts, networks:
	initial checkin
1999-02-11 21:10:49 +00:00
tribby
05d82736bc Changes for gsh version 2.0d10:
Add check for buffer overflow when globbing, expanding variables, or
inserting aliases (PR#110).  Increase buffer size from 1024 to 4096.

Increase buffer for reading commands from 256 to 1024 bytes in order
to match the maximum length used when reading.
1999-02-08 17:26:51 +00:00
gdr-ftp
e776384122 Makefile:
Added rules to handle the source-on-case-sensitive-
	appleshare-server problem.
1999-02-08 06:20:56 +00:00
gdr-ftp
765f0298d7 writev.c:
Changed return type of writev from size_t to ssize_t.
1999-02-08 06:18:59 +00:00
gdr-ftp
135cfc6169 sim.asm:
- did a 'setcom 60' to catch the weird formatting
	- created a dummy routine to go in the .root file.
	- this file didn't originally compile due to unresolved
	  references to ExtVect2.  Looking at the source it appears that
	  someone had started to modify it to allow a second interrupt
	  vector, but handn't finished the job.  I commented out the
	  initialization and checking of ExtVect2.
simlib.asm:
	- did a 'setcom 60' to catch the weird formatting
	- created a dummy routine to go in the .root file.
Makefile:
	- complete overhaul to fit into the GNO base builds
1999-02-08 05:53:38 +00:00
gdr-ftp
b29f3e7037 last.c:
- some debugging printfs had been left in.  They're now #ifdef'd
	  out
1999-01-29 07:52:17 +00:00
gdr-ftp
32a9a4f966 README.install
- more changes mirrored from intro.tex
1999-01-29 07:13:09 +00:00
gdr-ftp
860eae42c8 intro.tex:
- specify where the gnohfs.shk archive should go
	- give instructions regarding files for the \*/System hierarchy
1999-01-29 07:07:26 +00:00
gdr-ftp
7764fc40c2 Makefile:
- revamped.  Cleaned up a lot and corrected some targets.
mkgen:
	- updated email addr
	- removed links to Nathan's pages
	- added crypto category
tail.html:
	- removed links to Nathan's pages
view.html:
	- added crypto category
1999-01-29 07:03:57 +00:00
gdr-ftp
5de7c76601 Makefile:
- install sed into /usr/bin rather than /bin
1999-01-28 18:52:03 +00:00
gdr-ftp
3d3af63fa7 installboot1:
- create /var/spool/lpq on the destination system
1999-01-28 06:55:24 +00:00
gdr-ftp
38886e1037 fudgeinstall:
- install GNOSnooper, FilePort and Nullport drivers, GNOBug,
	  the GNO icon, and SIM.
mkboot:
	- put the GNO icon on the boot disk
	- put a Finder.Root and Finder.Data file on the boot disk, so
	  that only the kernel and the README.install script are initially
	  visible
1999-01-28 06:54:31 +00:00
gdr-ftp
f422765df7 gshrc:
- added workaround for PR#113
README.install
	- checked in some changes propagated from the intro.tex file.
1999-01-28 05:34:38 +00:00
gdr-ftp
8533bbfd16 Makefile
- eliminate some dead macros
intro.tex:
	- change formatting a bit; I forgot that one section is taken
	  almost verbatim to create the README.install file, and the
	  previous checkin made things a bit messy.
mknotes:
	- strip out hturl{} TeX stuff when creating the README.install
	  file
1999-01-28 05:22:16 +00:00
gdr-ftp
f2f24b8623 intro.tex:
- correct name of GS-ShrinkIt
	- mention that spaces cannot be used in pathnames in the
	  /etc/namespace file
	- fixed some formatting problems where words were run together
	  when switching from boldface or italic back to roman type
	- updated disk space requirements for v2.0.6
	- be more explicit in "extracting and installing [v2.0.6]"
	  about the destination volume names and requirements
	- some changes of awkward text
1999-01-27 06:35:42 +00:00
gdr-ftp
5c5d7e8ed2 status.bin:
- updated entries for gnobug, aroff, binprint, mkso, and nroff
1999-01-27 06:29:19 +00:00
gdr-ftp
5768f6ef99 doing.builds:
- expanded info on how to make a distribution (various points)
1999-01-27 06:27:59 +00:00
gdr-ftp
433ce0b614 fudgeinstall:
- work around for PR#110 (command line length limited to 2048 chars)
1999-01-26 08:20:04 +00:00
gdr-ftp
7cfb0be8e5 mkso.data:
The entries for psignal.3 were backwards.
1999-01-26 07:56:20 +00:00
gdr-ftp
2f523024cd intro.tex:
- don't specify the date; TeX will pick up the current date for
	  the date of publication
	- update some copyright notices
	- my current version of tex2html can't handle boldface text within
	  enumerated lists.  Eliminate the boldface for now.
1999-01-26 07:30:14 +00:00
gdr-ftp
8979bdf2d8 Makefile:
moved some text; no real change

tail.html:
	removed link to Nathan's page, since he dropped the II.
1999-01-18 16:48:11 +00:00
gdr-ftp
5573e0e240 describe.src:
- new entry for aroff
	- updated entries for binprint, install
1999-01-18 03:03:26 +00:00
gdr-ftp
15ad1533e2 fudgeinstall:
- create directories /lib/rinclude and /usr/ainclude, and
	  populate them
	- updated entries for:
		initrc, aroff, binprint, gsh, /etc/glogin, syslog.conf,
		getvers, nroff, tmac.an, tmac.s
	- grab describe.src from the source repository
mkboot:
	- create directories /var/adm and /doc, and insert 'delete.me' files
	- install glogin file
checksizes:
	- initial checkin.  This script complains if the extracted size of
	  a NuFX archive is larger than will fit on an 800k disk.
builddate.rez:
	- this has been moved to ../rinclude
1999-01-18 03:00:16 +00:00
gdr-ftp
11aa6241ea delete.me:
- mention that this file is part of the GNO distribution
1999-01-18 02:02:24 +00:00
gdr-ftp
4007bf88c5 gshrc:
- some portions of this file were moved to /etc/glogin
	- don't alias df(1) any more
1999-01-18 02:01:29 +00:00
gdr-ftp
1fc31412c8 README.install:
- changes automatically made to this file from the intro.tex file
gshrc:
	- some portions were moved to the /etc/glogin file
	- added some comments
	- print out a reference to the vi tutorial
installboot1:
	- make sure the /tmp directory is created
1999-01-18 01:59:52 +00:00
gdr-ftp
d3b64a9887 glogin:
initial checkin
1999-01-18 01:51:13 +00:00
gdr-ftp
1f8c740278 Makefile, intro.tex, mknotes:
The file ../../verbatim/boot/README.install is now partially
	generated from intro.tex via the mknotes script.

intro.tex:
	- expanded and corrected v2.0.6 installation notes
	- translated " --> '' (TeX style)

mkhtmlman:
	Don't try to create man pages from resource forks (which would
	have been created by either CAP or Netatalk).
1999-01-18 01:46:07 +00:00
gdr-ftp
36c45596c9 inst.c:
Fixed PR#107 (bad output with -V)
inst.1, inst.desc, inst.rez, inst.c:
	Updated version number to 1.3
1999-01-16 19:30:56 +00:00
gdr-ftp
00cd830bd0 Makefile:
Changed to match the base builds.

binprint.asm:
	Renamed to doline.asm.  The default makefiles don't like to have
	name overloading like there was with binprint.c and binprint.asm

doline.asm:
	- added a dummy segment
	- added the setcom directive

binprint.c:
	- added stack checking code
	- prototyped functions
	- removed extraneous declarations
	- fflush stdout before writing to STDOUT_FILENO

binprint.1, binprint.desc, binprint.rez:
	- initial checkin
1999-01-16 18:35:57 +00:00
gdr-ftp
fc1083b2b0 binprint.c:
Reformattted source.  No substantive change.
1999-01-15 15:54:40 +00:00
gdr-ftp
8cea45f4f0 aroff.c:
- removed some dead code that I forgot about for the previous
	  checkin
1999-01-15 15:46:08 +00:00
gdr-ftp
d49f72c8b0 aroff.c:
- checked and reduced stack size to 1k (actually used is about 748)
	- changed awgs.h --> aroff.h
	- minor formatting changes
	- added some missing header files
	- eliminated a call to some old GNO v1.0 (?) stdio initialization
print.c:
	- changed awgs.h --> aroff.h
	- minor formatting changes
1999-01-15 15:45:04 +00:00
gdr-ftp
d1c781eaf4 Makefile:
- completely changed for new builds
awgs.c, awgs.h:
	- renamed to aroff.c and aroff.h, respectively
	- inserted RCS Id tag
	- reformatted source (not substantive changes)
aroff.1, aroff.rez, aroff.desc:
	- initial checkin
1999-01-15 08:36:31 +00:00
gdr-ftp
1fb579993f describe.src:
- updated entry for gsh
1999-01-15 07:57:42 +00:00
gdr-ftp
25acdd5de9 common.c common.h udlgs.c udlunix.c:
Replace use of getwd(3) with getcwd(3); it's safer.
1999-01-15 07:36:15 +00:00
gdr-ftp
96970e3e76 Makefile:
- changed path to libtermcap
1999-01-15 06:50:35 +00:00
gdr-ftp
a10d56e871 Makefile:
- Allow for sources to be on an appleshare volume.
1999-01-15 06:43:16 +00:00
tribby
41372644be Listed Tim Meekins as author, and removed reference to Free BSD code. 1999-01-14 23:55:58 +00:00
tribby
e586eeefeb Changes for gsh version 2.0d9:
Added additional optional debug code. A version of gsh with the memory
checking debug code turned on is available as an exe file.

Lock and unlock the hash mutual exclusion key in when disposing of the
hash table.

Allow five digits rather than four when printing the process number in
the ps command.

Piping the output of a command into a non-executable file no longer
causes gsh to hang.
1999-01-14 17:44:25 +00:00
gdr-ftp
d4ee658beb Makefile:
Fixed up and simplified the 'release' and 'install' targets; use
	the default ones from binrelease.mk and supply subsidiary recipes.
1999-01-14 05:33:20 +00:00
gdr-ftp
ad04b0113e Makefile:
Allow for sources being on a Netatalk-served volume.
1999-01-11 06:05:34 +00:00
gdr-ftp
85d56e8a3c status.bin:
Updated entries for getvers, sum, whereis, cron.
1999-01-11 01:29:48 +00:00
gdr-ftp
48ce3af1e2 describe.src:
- added entry for gsh
1999-01-11 01:27:07 +00:00
gdr-ftp
c77b46a12d Makefile:
- Simplify; a lot of the stuff this makefile did previously is
	  now available by including <prog.mk>.
1999-01-11 01:25:43 +00:00
gdr-ftp
2b00b1d41a ttymsg.c:
Corrected return type of writev(2).
1999-01-11 01:24:47 +00:00
gdr-ftp
66eeae13e0 Makefile:
Add workaround for PR#106 (dmake).
1999-01-11 01:24:02 +00:00
gdr-ftp
d964ac088f MANIFEST:
- Initial checkin. Explains what the various file here are.
TO.DO:
	- moved to 'devel' subdirectory
archives:
	- Initial checkin.  Shows breakdown of distribution disks.
headers:
	- made some updates.  This is probably really out of date.
new.syscalls:
	- deleted.  This information is now in the kernel reference manual,
	  so avoid duplication.
status.bin:
	- updated entries for ed, asml, assemble, cmpl, col, calendar.
status.lib:
	- updated entries for routines vsyslogmt, syslogmt, vis, and unvis.
	- updated entries for files syslog.c and vis.c
status.usrman:
	- Initial checkin.  This lists the status of the files in the
	  src/gno/usr.man directory hierarchy.
update.usrman:
	- Initial checkin.  A script to help keep status.usrman current.
1999-01-09 21:28:35 +00:00
gdr-ftp
63c3c2629c MANIFEST:
Initial checkin. Explains what the various file here are.

adding.utils:
	Initial checkin. Discusses stuff necessary to add utils to the
	base distribution.

doing.builds:
	Initial checkin. Explains how to create the base builds.
1999-01-09 21:19:58 +00:00
gdr-ftp
df675b5803 Makefile:
Added work-around for PR#106 (dmake).
1999-01-09 18:52:56 +00:00
gdr-ftp
28c606e490 Makefile:
- set up custom "release" and "install" targets for gsh
	- added describe entry
1999-01-08 07:38:47 +00:00
gdr-ftp
39f181121d describe.src:
Updated entries:
	apropos, awk, basename, catman, catrez, cmp, cpp, cut, descu,
	dirname, getty, getvers, install, last, lseg, makewhatis, man,
	nroff, renram5, rmdir, split, sum, tail, tee, test, tr, udl,
	uname, wall, wc, whatis, whereis, who, whois
    Added entries:
	asml, assemble, cat, chtyp, cksum, cmp, cmpl, colcrt, compile,
	ctags, df, false, fmt, ftp, head, help, inetd, kill, link, logger,
	login, mkso, pwd, rcp, removerez, rlogin, rsh, sed, sleep, syslogd,
	true, uniq, yes
1999-01-07 08:36:33 +00:00
gdr-ftp
d073b63fc1 updated "FTP:" field in describe entry to fix site names; use current
names for trenco, ground, and caltech
1999-01-07 08:20:19 +00:00
gdr-ftp
9818323355 Makefile, rmdir.c:
Take contrib.h out of system include directory rather than the
	GNO source build directories.
1999-01-07 07:50:10 +00:00
gdr-ftp
508f00afb5 chtyp.desc:
corrected "Name:" field
1999-01-07 07:49:08 +00:00
gdr-ftp
bd0308e3b2 binconst.mk:
- when building the various utilities, have the 'release'
	  target update the master describe database source, rather
	  than a copy of it.
1999-01-07 07:28:14 +00:00
gdr-ftp
3443e714c6 mkso.data:
added .so links for vis.3 and unvis.3 pages
1999-01-07 05:18:07 +00:00
gdr-ftp
a2225ddb83 vis.3, unvis.3:
initial checkin
1999-01-07 05:17:24 +00:00
gdr-ftp
25b2576666 syslogd.3:
- added a BUGS section
	- added info regarding syslogmt and vsyslogmt
sprintmt.3:
	- fixed a typo
1999-01-06 03:44:45 +00:00
gdr-ftp
a803274121 describe.src:
Added entry for ar(1), submitted by Scott Moberly.
1999-01-04 15:50:26 +00:00
gdr-ftp
49196eea67 logger.c:
- the syslog routines in libc should never have been changed to
	  take long parameters.  Restore the relevent code in this program
	  to the original types.
1999-01-04 05:13:56 +00:00
gdr-ftp
273780523c Makefile:
eliminate oldlog.c from the build.  old_syslog() was only used by
	syslog2.asm, and inspection showed it to be likely buggy anyway.
	It was missing a field in the passed data structure, and using
	it would cause any long-running daemon to run out of memory if
	didn't crash first.  For now I'm leaving oldlog.c where it is
	rather than doing a 'cvs rm'.

syslog.c:
	Major changes...
	- The facility/priority has gone back to being of type int vice long;
	  the original change was a red herring.
	- The current syslog implementation will now talk to Phil's original
	  syslogd.
	- The busy wait in sendPort now forces a context switch.

syslog2.asm:
	- I commented the sources while figuring out what Phil's syslogd
	  was doing.  I may was well check in those comments even though
	  this file is not currently used.
	- fixed the save name and the 'mcopy' directive

vis.c, unvis.c:
	- initial checkin
1999-01-04 05:10:36 +00:00
gdr-ftp
edee25c942 syslog.h:
- The facility/priority has gone back to being of type int vice long;
	  the original change was a red herring.
	- The current syslog implementation will now talk to Phil's original
	  syslogd, so only list the version zero protocol structure.
1999-01-04 05:09:04 +00:00
gdr-ftp
f880e0c973 vis.h: initial checkin 1999-01-04 05:08:13 +00:00
gdr-ftp
6b44130571 ports.c:
initial checkin for test re PR#102
1998-12-31 22:45:35 +00:00
gdr-ftp
8621395051 Makefile:
added kludge to allow rez files to be on Appleshare.
1998-12-31 21:34:56 +00:00
gdr-ftp
6d572535da binconst.mk, binrules.mk:
- Allow for rez source to be on Appleshare volumes.  Kludge is
	  not enabled by default (see paths.mk).
1998-12-31 21:26:34 +00:00
tribby
6269a8ca25 Changes for gsh version 2.0d8:
Fixed several mutual exclusion problems, including a particularly nasty
one that would cause gsh to loop forever inside the memory manager. (You
could identify this one by the "BRA (-23)" at the bottom of the infinite
loop.)

Fixed the string vector print routine to properly handle all numbers of
entries in the hash table.  Previously, it would always print duplicate
entries if there were < 6 commands hashed, and would sometimes print
duplicates (depending on previous contents of an internal table) for
other numbers of commands.

gsh would wait on background processes started from an exec file
(executed, not sourced). Now the exec file does not wait on the process,
but the background process is not associated with the parent shell after
the exec file terminates.

Made gsh globbing work more like csh: if none of the requested patterns
are found, print "No match" and exit.

At startup, if /etc/glogin, $HOME/glogin, or $HOME/gshrc does not exist,
don't report a "file not found" error message. (PR#100)
1998-12-31 18:29:14 +00:00
gdr-ftp
bc56eb46eb describe.src:
- new entries from Scott Moberly: dd, printf, soelim, tty,
	  uudecode, and uuencode
1998-12-31 09:45:00 +00:00
gdr-ftp
f790e8d53c paths.mk:
Added the APPLESHARE_CASE_SENSITIVE macro.  See PR#98.  This
	is disabled by default.
1998-12-22 16:13:41 +00:00
gdr-ftp
412340be8b lib.mk:
Added an implicit rule for making rez targets where the sources
	reside on an Appleshare server.  See PR#98.
1998-12-22 16:11:42 +00:00
gdr-ftp
2604b42f9a Due to PR#98, change it so that the builddate.rez file is always taken
out of 13/RInclude instead of /src/gno/build.tools.  This implies that
builddate.rez has to have been previously installed in 13/RInclude; this
is done by the 'install' and 'release' targets in /src/gno/build.tools.
1998-12-22 16:08:54 +00:00
gdr-ftp
7de2321a08 Makefile:
- initial checkin.  Needed for 'install' and 'release' targets.

dmake.startup, startup.mk:
	- When dmake finds a startup.mk in the current directory, it
	  parses that file after the system startup.mk.  In this case they're
	  one and the same.  While this shouldn't be a problem, it's
	  causing dmake to crash.  See PR#99.

	  The workaround was to rename startup.mk in this directory to
	  dmake startup.  It is renamed back to its proper name in the
	  recipes to the install and release targets.
1998-12-22 15:57:32 +00:00
tribby
e7f2691599 Changes for gsh version 2.0d7:
Fixed several memory leaks.

Prefix command without any parameter (to list the prefixes) would cause
memory corruption when prefix had been invoked previously with a parameter.

Sourcing a command file from within an exec file could cause gsh to
wait forever, depending upon the commands executed in the sourced file.

All built-in commands return appropriate status: 1 for error, 0 for no error.

Fixed several cases where incorrect value was set in $status.

Added usage strings for tset, hash, commands, and history.

Fixed memory corruption error when edit command had no parameters.

When system() is called with pointer = NULL or with a command string that
causes gsh to detect an error (e.g., incompatibility with | and <), return
status of -1. In other cases, return process's status rather than always 0.

System would crash when output from a non-forked command was piped to
another process; for example   clear | cat > /tmp/list
1998-12-21 23:57:08 +00:00
gdr-ftp
7ec020a057 Convert CR-->LF in sources; they were checked in with the wrong newline
delimiters.
1998-12-13 02:50:33 +00:00
gdr-ftp
fd0aff2031 Added submissions from
Scott Moberly:	ed, md5, vis, unvis
	Marlin Allred:	trek
1998-12-10 19:12:27 +00:00
gdr-ftp
d5ac497f92 describe.src:
corrected a small typo
1998-11-03 16:12:53 +00:00
gdr-ftp
9fac710f39 describe.src:
Added new entries submitted by Scott Moberly: users, units,
	col, quiz, and nologin.
1998-11-03 16:10:19 +00:00
tribby
4879056d84 Changes for gsh version 2.0d6:
Fixed defect introduced in version 2.0d5: when a background job completed
while gsh was waiting for command line input, gsh would print a bogus error
message and quit.
1998-11-02 17:40:56 +00:00
gdr-ftp
2a358f71bc updated the ChangeLog for libc 1998-10-31 20:24:16 +00:00
gdr-ftp
b629f70366 intro.tex:
- added a brief comment regarding anon cvs updates
1998-10-31 20:23:29 +00:00
gdr-ftp
1d0c7e0be2 status.bin:
Updated entries for: calendar, syslogd
status.lib:
	Updated entries for: sprintmt, vsprintmt, syslotmt, vsyslogmt,
	closelog, openlog, readv, setlogmask, syslog, vsyslog, writev
TO.DO:
	Added a bunch of stuff, deleted some.  How's that for a precise
	explanation?
1998-10-31 19:14:49 +00:00
gdr-ftp
bf00017f17 syslog.3:
Use <stdarg.h> vice <vararg.h> in the synopsis.
1998-10-31 19:05:57 +00:00
gdr-ftp
0fa42147e3 Initial checkin of syslogd v2 for GNO. This was a complete rewrite
from both Phil Vandry's v1 syslogd (which is part of init), and the
BSD version.  It still needs some work, but it can log to a file
or to console at the moment.

Until syslogd v1 is removed from init, you should ensure that you're
not logging to the same file from both versions of syslogd.
1998-10-31 19:02:47 +00:00
gdr-ftp
c2d4a9371b gno.h:
- Added declaration for the global "__progname".
	- Added prototypes for sprintmt(3) and vsprintmt(3).
1998-10-31 18:50:44 +00:00
gdr-ftp
a9c8ba111c syslog.h:
- added prototypes for vsyslogmt() and syslogmt()
	- changed the internal structure used by syslogd(8) and the
	  syslog(3) family of routines
1998-10-31 18:48:50 +00:00
gdr-ftp
b84b251619 added test for syslogmt(3), vsyslogmt(3) 1998-10-31 17:25:04 +00:00
gdr-ftp
6eebdb8e3a Makefile, vsprintmt.c:
- Added the sprintmt and vsprintmt routines.  These are thread
	  safe variants of the sprintf and vsprintf routines.  Note that
	  they don't support as many formatting options as stdio does.

gnomisc.c:
	- Define the global variable "__progname".  This is initially
	  set to "(unknown)", but is properly initialized to the return
	  value of __prognameGS() the first time that function is called.
1998-10-31 17:22:05 +00:00
gdr-ftp
fd73dca790 syslog.c:
- added thread safe functions syslogmt and vsyslogmt.
	- minor changes to sendPort to make it thread safe
	- moved variadic wrappers to the end of the file so that the
	  command line optimize/debug levels get propogated through
	  the rest of the source during compilation.
	- changed the mechanism by which sendPort waits for it's buffer
	  to be released by syslogd
	- since ctime(3) is not thread safe, add a flag to the
	  SyslogDataBuffer_t that tells syslogd(8) to add the appropriate
	  time stamp.  This is easier than implementing thread safe
	  versions of ctime and localtime.
1998-10-31 17:17:24 +00:00
tribby
963a33c4bf Changes for gsh version 2.0d5:
Add quotes around null parameters from the command line so they will be
parsed properly (resolves PR#84).

Output piped to an unfound command caused gsh to terminate, due to an
interface change to the GNO 2.0.6 version of getpgrp(2): it now returns the
process group of the caller.  To get the process group number for the
pid passed as a parameter pid, the call has to be made to _getpgrp(2).
In addition to fixing invoke.asm, updates were also made in jobs.asm.

When directory stack is full, pushd, reports a new error message: 'pushd:
Directory stack full'.  (Previously, 50 pushds would cause a crash.)

When parameter passed to "pushd +n" is <= 0, report a new error message:
'pushd: Invalid number'. (Previously, tried to chdir to the parameter.)

When a command appends to stderr (e.g., echo test >>&/tmp/err), stdin was
closed, due to errappend being defined as pipefds+2 rather than pipefds+4
in cmd.asm.

When there was an error reading stdin, gsh went into an infinite loop of
beeping and requesting more input. Changed getchar (in stdio.asm) and
GetCmdLine (in edit.asm) to report the error and terminate.

Code in cmd.asm set and reset handler for signal SIGSTOP (17). This makes
no sense, since there cannot be a handler for SIGSTOP. This was changed
to set and reset signal SIGTSTP (18) since that handler is used by gsh.

The error message "specify a command before redirecting" was never
caught by the invoke() subroutine because the next higher routine,
command(), checked for argv==0 before calling invoke(). The error
message was moved into command().
1998-10-26 17:04:51 +00:00
gdr-ftp
0c8ae50cfc mkso.data:
Added links for __progname(3), vsprintmt(3), syslogmt(3), and
	vsyslogmt(3).
1998-10-25 17:17:21 +00:00
gdr-ftp
7199e83868 sprintmt.3:
Initial checkin for sprintmt(3) and vsprintmt(3) documentation.

syslog.3:
	Add descriptions of syslogmt(3) and vsyslogmt(3), which are thread-
	safe variants with more limited format specifiers.

progname.3:
	Added description of the "__progname" variable.  This in effect
	exposes the cache value used by __prognameGS().  It was necessary
	for the proper operation of the thread-safe syslog routines.
1998-10-25 17:15:51 +00:00
gdr-ftp
96955b85a3 Makefile:
The "up" link in the reference manuals was broken; the -up_title
	flag to tex2html was missing.

intro.tex:
	- reworked Overview chapter.  Replaced "The GNO/ME Package" with
	  "Documentation Roadmap", updated "Obtaining GNO", etc.
	- Added section to "Installing v2.0.6" about how to obtain source
	  by anonymous cvs and anonymous ftp.
	- publish date changed
	- updated copyright dates

refs.html:
	- minor grammatical changes
1998-10-14 03:14:02 +00:00
gdr-ftp
3061aa26a4 Added the following entries, submitted by Scott Moberly:
comm
	paste
	rev
	tput
	unifdef
1998-09-27 15:53:03 +00:00
gdr-ftp
c4af1317ee intro.tex:
Various changes as requested by Dave Tribby.  Some are typographic,
	some are broken links, ambiguities, etc.  No change of basic
	content.
1998-09-24 06:49:58 +00:00
tribby
1dc5497309 Added startup protocol as requested by Devin Reed (PR#78) and Steve Reeves
(PR#85, PR#86):
   For login shells (command line starts with '-'),
	If $PATH doesn't start with ':' or contain a space,
	   change all ":" to " ".
	source /etc/glogin
	source $HOME/glogin
$HOME/gshrc is sourced afterward for both login and non-login shells.

Don't the print number of hashed commands (from "rehash") until all
initialization is completed.

Only pass exported environment variables to child processes, and prevent child
processes from changing parent's environment.

A null command followed by a redirection of stdout, for example
  > /tmp/list
would cause an error message "<garbage> not found" due to incorrect
setting of command buffer pointer.

Filename completion did not work following ">&" or ">" without a trailing
space.

Entabbed all the asm files, saving more than 36,000 bytes.
1998-09-08 16:53:14 +00:00
tribby
2e0ebb5392 Replaced last of old shell calls with their newer counterparts. This
removed the need for p-string routines, so they were removed. Also
removed alloc256/free256 and associated data structures.

In removing calls, found instances in pwd & prefix commands and prompt
handler where current directory name was assumed to be < 256 characters;
recoded to use a flexible buffer size.

Updated and expanded mmdebug.asm routines that perform error checking on
memory management calls. Added macros ~NEW and ~DISPOSE that invoke either
the real or debug routines.

Fixed call to read $TERM variable's length to fix PR#81.

Removed echo of data when setting value of $< in expandvars (expand.asm).
The characters are echoed as they are typed and do not need to be reprinted
on stdout after carriage-return is typed.

Added error checking to the various flavors of prefix (just like cd):
  - Verify 2nd parameter is a valid directory before setting.
  - Verify 1st parameter < 32 before displaying or setting.
1998-08-03 17:30:30 +00:00
tribby
d534981038 Changed many invocations from old shell interface routines (Read_Variable,
Set_Variable, Export, etc.) to new ones (ReadVariableGS, SetGS, ExportGS,
etc.) in many places; there are still a few more to change.  This change
removed the 256-character limit on strings retrieved by these routines,
such as the value of environment variables. (PR # 9).

At startup do not set $TERM to gnocon if it is already set.

Removed the df command (from builtin.asm).

Defined macro incad to increment a 4-byte address, checking for overflow;
replaced instances of "inc ptr" with "incad ptr".

Changed column offset table to use a 1-word rather than 1-byte entry. This
resolves PR#14 (hash wouldn't print beyond first 256 filenames).

Fixed defect in unalias (alias.asm) where the double quote portion of the
scanner would look for a terminating single quote. This resolves PR#69.

Changed default order for copying files in $PATH dirs into executable list,
so earlier paths files are found first.

Added environment variable flag $OLDPATHMODE to make gsh behave in the old
(backwards order) way when necessary.

Discard duplicate filenames when hashing.

Fix PR#73: directory in $PATH with escaped space (\ ) is not searched.
1998-07-20 16:23:11 +00:00
gdr-ftp
615d7ab922 syslog.3:
- fixed some formatting problems
1998-07-07 03:32:44 +00:00
gdr-ftp
ed7f658d4e fudgeinstall:
- don't fudge sed(1) any more; it's done
1998-07-07 02:31:22 +00:00
gdr-ftp
4957db0caf Makefile:
- set HAS_BSD_MANPAGE to 'true' -- get the right one when building
	  the release.
1998-07-07 02:19:26 +00:00
gdr-ftp
3689484d24 calendar.c:
- fixed a bug introduced in 1.1 where getting an error while
          reading the calandar file could cause an infinite loop
        - added "ChangeLog" comments for all versions
	- added stack checking
        - eliminated "pragma stacksize" from the source file; it was too
          small (was 512 bytes, currently using 862 bytes) and overriding
          the value given on the command line during the GNO base build
          process
README, calendar.info:
	- Moved the information in these files to the man page.
Makefile, calendar.rez:
	- initial checkin
calendar.1:
	- cleaned it up a bit and made it conform to the GNO base builds
	- added an example
1998-07-07 02:14:30 +00:00
gdr-ftp
b40c451852 calendar.1, calendar.c:
Updates for v1.1 as submitted by Marlin Allred.  His comments:

	"I compiled calendar with the 2.0.6 libraries and fixed it so
	 the date could be put anywhere on the line. I also fix[ed] the
	 program so that tomorrow's and Monday's activity was also being
	listed. The man page for calendar was also updated. [...] I did
	not update the source file to indicate the changes made."

calendar.desc:
	Updated for v1.1.
1998-07-04 17:24:38 +00:00
gdr-ftp
5a9733461b describe.src:
- added entry for 'eject'
	- updated entry for 'calendar'
1998-07-04 17:13:43 +00:00
gdr-ftp
546377ce0d - added describe entry 1998-07-04 17:05:18 +00:00
tribby
01902c1b91 Major changes to gsh with this checkin:
* When ~ is parsed and next character is a delimiter, make sure contents
   of expanded $HOME match the user's delimiter.

 * When wildcard patterns don't match, rather than terminating the command
   gsh now prints "No match: <pattern> ignored" and passes the command line
   minus the unmatched patterns on to be executed.

 * Modified echo command so it doesn't add a blank to the end.

 * Make "clear" and "source" built-ins non-forked commands.  Unforking
   "source" allows prefixes to be set in files that are sourced.

 * Add loop to parse a single command (removing leading whitespace) before
   sending it off to be expanded and executed. Skip null lines and comments
   at this level. This allows later commands that depend upon variables set
   in the 1st command to work; e.g.: set t_num=1 ; echo "Test number $t_num"
   Also fixes problems seen when tab was first character of multiple lines.

 * Initialize environment variable flags at startup (for echo, nodirexec,
   nonewline, noglob, nobeep, pushdsilent, term, and ignoreeof). Set
   flag when env var is set in upper or lower case (formerly, only worked
   with lower case).

 * Lots of places two-word addresses are incremented using inc, without
   checking for overflow into the high-order word. As these are discovered,
   they are changed to use adc on both words.


See file UpdateLog for detailed list of changes.
1998-06-30 17:26:04 +00:00
gdr-ftp
f5e621f814 status.bin:
- updated entries for edit(1) and logger(1)
1998-06-26 01:29:37 +00:00
gdr-ftp
afc1676d9f syscall.c:
- added readv (untested) and writev (tested)
1998-06-24 04:22:38 +00:00
gdr-ftp
b7010abc60 This is a re-implementation of the syslog(3) and related functions. 1998-06-24 04:20:02 +00:00
gdr-ftp
4e1bec2062 stdio.h:
Changed some '0' constants to '0L'.  Probably not necessary, but
	consider it paranoia from earlier ORCA/C bugs.

sys/syslog.h:
	These changes reflect the new implementation for syslog(3) and
	friends.  The biggest change is that the facility/priority (which
	is encoded as a single number) requires 32 bits, so has been moved
	from an int value to a long value.

	This means that any programs using syslog(3) cannot merely be
	relinked, but will need to be recompiled.

	This file also contained various constants coded as bitshift
	values, like (4<<3).  ORCA/C can't handle this in the context
	of a constant initializer, so these constants have been resolved
	and changed to single hex values.  The originals are left in
	comments.

sys/uio.h:
	- #include <sys/types.h> if it has not already been done.
	- change the return value of readv/writev back from size_t to
	  ssize_t.  I don't recall why they were originally changed,
	  given that they weren't implemented and BSD uses ssize_t.
1998-06-24 00:12:32 +00:00
gdr-ftp
c6c45722d8 logger.c:
Did changes for the initial GNO version.  This includes:
	- prototyping;
	- changing the facility/priority value from an int to a
	  long (we need 32 bits for all the information);
	- stack checking code; and
	- after doing a freopen() of stdin, change it back to text mode.

Makefile, logger.rez, logger.desc:
	New files.
1998-06-23 23:23:55 +00:00
gdr-ftp
442d75ce87 netif.h:
Replaced a non-standard #import directive with a guarded #include.
1998-06-22 06:48:55 +00:00
gdr-ftp
23e61fe09c logger.1G:
Added GNO version of man page.
1998-06-22 05:05:55 +00:00
gdr-ftp
40d932969c logger.c, logger.1:
Initial checkin.  No change from BSD sources.
1998-06-21 04:21:04 +00:00
gdr-ftp
560e9a67ad bugs.html:
Explain how to submit followups to a given PR (problem report)
	using the email interface.
1998-06-19 23:35:07 +00:00
stever
4bd91df5de Fixed "ls -s" kilobyte calculation. See PR#48 for details. 1998-06-17 07:00:27 +00:00
stever
a43a7e27fd Trying a test cvs checkin. 1998-06-17 05:13:38 +00:00
gdr-ftp
999f6066fb index.html:
added links for status lists

intro.tex:
	added installation chapter for GNO v2.0.6.  This isn't finished
	yet, but it's a start.

kern.tex:
	fixed typo for listen(2)

related.html:
	fixed html link.

ignored.pages:
	added some ... deleted some
1998-06-12 14:47:44 +00:00
gdr-ftp
94012d9889 edit.c:
- initial checkin
1998-06-12 05:06:24 +00:00
tribby
cd8bfae836 Create *.mac files from gsh.mac via Makefile.
Added direct-page/stack data segment of size 2048 to main.asm.  It is
initialized to be filled with "?" characters, so that it can be examined
to see how much space is actually being used.
1998-06-09 16:22:56 +00:00
gdr-ftp
6cdf1b9893 describe.src:
- clarified descriptions of "lam" and "from".
1998-06-04 03:41:42 +00:00
gdr-ftp
c39b230a61 gsh.1:
- initial checkin.  This is mainly just a pointer to the reference
	  manual.
1998-06-04 03:11:28 +00:00
gdr-ftp
102c443527 - Added entries for from, jot, lam, lc, and nohup (submitted by Scott
Moberly).
- inserted a blank line after the "FTP:" line for some entries.  These
  lines had been deleted due to a bug in descu.  See PR#66 for details.
1998-06-03 16:09:46 +00:00
gdr-ftp
92eced2bba status.bin:
updated entries for gsh, rsh, rlogin
1998-06-02 13:11:02 +00:00
gdr-ftp
69723f10b6 Makefile:
- except for main.root, delete all created *.root files just after
	  they're made.  This avoids duplicate symbols in the link step.
1998-05-30 17:21:40 +00:00
gdr-ftp
49801ffa31 setvers.1:
- expanded the .TH line to have all arguments.  If this is not
	  done, then when building the html versions of the man pages
	  the page is not recognised as a GNO man page and is ignored.
1998-05-30 16:09:41 +00:00
gdr-ftp
750cc1d6da trap.asm:
fixed a comment regarding exec(2)
1998-05-30 15:36:15 +00:00
gdr-ftp
769c8a8027 initrc:
Initial checkin.  This is the one used for starting the multiuser
	package.
1998-05-30 14:36:51 +00:00
gdr-ftp
d4f470ef7d paths.mk:
- removed makefile macros for DISKS and DISK?; they're not
	  needed any more.
1998-05-30 14:18:04 +00:00
gdr-ftp
5e602d499d Added entries for column, expand, file2c, unexpand, and what. 1998-05-30 03:11:15 +00:00
tribby
068fd5bb72 Change call of execve to _execve. 1998-05-11 19:18:43 +00:00
tribby
1f9c2a058b New output test case 1998-05-08 17:37:36 +00:00
tribby
e014797a8e Update getvers per user feedback:
* Add -f option to control printing of filename
  * Rewrote printing of text to allow carriage-return and tab
  * Report no version information as warning for both no rVersion and
    no version fork
1998-05-08 17:33:46 +00:00
tribby
519805dbb4 Modifications for getvers 1998-05-08 17:31:03 +00:00
tribby
2a2c7d8648 Tests modified for latest getvers 1998-05-08 17:30:23 +00:00
tribby
91c2c09f56 Preparation for checking in new getvers 1998-05-08 00:37:29 +00:00
gdr-ftp
9170dd1a63 fsettext.3, funopen.3:
Explained how to get binary streams on the result from an
	funopen(3) call.
execl.3:
	minor "see also" change
1998-04-29 03:33:14 +00:00
gdr-ftp
7c77098c01 kerntool.h:
Updated with the remainder of the changes for the v2.0.6 kernel.
1998-04-29 03:05:40 +00:00
tribby
f00cfed6ba Documentation files for setvers. Not yet modified. 1998-04-29 00:45:05 +00:00
tribby
d36d59e158 getvers version 2.0 test files. 1998-04-29 00:42:47 +00:00
tribby
3b6e40c95f Move the setvers files (unaltered, original versions) to their own directory.
No longer need gv, and new version of getvers has -b option that does the
work.
1998-04-29 00:23:12 +00:00
gdr-ftp
0a5e437e26 less, cron, crontab, at, atrun:
assigned to Steve Reeves
split, sed:
	passed testing
column:
	assigned to Scott Moberly
find:
	updated comment
1998-04-28 06:15:07 +00:00
gdr-ftp
f6ad5e32aa To.Do, UpdateLog:
Added explanation of the (minor) changes made in the initial
	v2.0.6 checkin, and what still needs to be done.

UpdateLog:
	Minor formatting change on some lines.

link.script, mods:
	These files are obsolete.
1998-04-28 05:51:26 +00:00
gdr-ftp
d2efd0151f Initial checkin of man pages for some of the gsh builtin commands.
Not all builtins are represented here.  Some information (such as
a dependancy on the 31/ prefix) is probably out of date, too.
1998-04-28 05:18:13 +00:00
gdr-ftp
cf2e1b8db9 dotests:
- updated paths to sed and the split binary under test
1998-04-28 05:08:38 +00:00
gdr-ftp
39b959d34c dotests:
corrected location of binary under test
1998-04-24 19:16:26 +00:00
gdr-ftp
f0419b78c8 Added entry for colrm. 1998-04-24 17:20:46 +00:00
tribby
731eb90c1e Add "MAIN= main" so that main.root will be created 1998-04-24 16:24:00 +00:00
gdr-ftp
61474a874f This checkin contains only enough changes that gsh is able to assemble
and link.  However, it does not work yet and thus still needs work.

The *.asm files have had the following common changes:
	- 'keep' lines were eliminated
	- the 'mcopy' now takes the macro from the /obj/gno/bin/gsh
	  directory.  This is in anticipation of having the macro
	  files generated from a single source file; there is a large
	  amount of duplication.  For the moment, the makefile merely
	  copies the old macro files from the "M" directory to the
	  /obj/gno/bin/gsh directory.
	- start each file with a dummy routine so that the source
	  code winds up in the *.o rather than the *.root file.
	- added the 'setcom 60' directive; there were many source
	  lines that were otherwise getting truncated.

The makefile is a complete rewrite.
1998-04-24 15:38:47 +00:00
gdr-ftp
eacedc7aca README.install:
- corrected mkso command line
	- explained what to do after install is complete
gshrc:
	- make problem report comment more explanatory
installboot1:
	- fixed up initial message
	- create the /lang/orca/utilities directory
installboot2:
	- fixed up initial message
	- create a man hierarchy in /gno-hfs
1998-04-24 06:02:21 +00:00
gdr-ftp
5533c5ed3c gshrc:
Eliminated unnecessary elements from root's MANPATH and PATH
	environment variables.
1998-04-24 04:15:29 +00:00
gdr-ftp
f07edb38f2 fudgeinstall:
don't install the v2.0.4 awk any more; the new one is working
mkboot:
	- add tee(1) to the boot disk
	- add a bunch of (require) empty directories
1998-04-24 03:38:51 +00:00
gdr-ftp
5af9e3b875 Checkin of install version 1.2. New to this version is use of GS/OS
sessions, and a verbose flag to print out file names as they are copied.
1998-04-24 00:54:06 +00:00
gdr-ftp
32ccee5a06 Updated entries for:
- last, wall, whois, getty, login (man pages)
	- awk (now complete)
1998-04-23 16:02:07 +00:00
gdr-ftp
2f6263d18a Install /etc/gettytab from this directory instead of taking it from
the gno/verbatim hierarchy.  In this directory, the file is called
"gtab" so that we don't confuse dmake.
1998-04-22 05:29:03 +00:00
gdr-ftp
eb014e0fc2 environ.7:
Fixed some formatting so that it looks right on the GS (use .IP
	instead of .TP commands).
1998-04-22 05:26:21 +00:00
gdr-ftp
038d5d04cf When building the 'release' target, install the mkso (and if appropriate,
mklink) data file in the proper spot.
1998-04-22 05:22:44 +00:00
gdr-ftp
0ed60a2fe1 mkso/Makefile, renram5/Makefile:
make these programs use the new chapter 8 generalization for
	the 'release' target
1998-04-22 05:09:55 +00:00
gdr-ftp
97bbd0ba97 binconst.mk, binrelease.mk:
- generalized the release target so that it can also be used
	  for chapter 8 programs.  This is done by defining the CHAPTER
	  macro to be 8.
	- if HAS_MKLINK_DATA or HAS_MKSO_DATA macros are set, then the
	  appropriate data files are copied when the 'release' target
	  is made.
1998-04-22 05:07:20 +00:00
gdr-ftp
f796d6adab gshrc:
- changed /usr/orca/bin to /lang/orca/utilities
	- general clean up
1998-04-22 05:01:15 +00:00
gdr-ftp
ddac971a82 These are all initial checkins. These files go onto the /gno.boot
disk, without modification.

README.install:
	Installation instructions for the user.
gshrc, initrc, namespace:
	For the boot disk.
installboot1, installboot2:
	Installation scripts for the user to run.
1998-04-22 04:57:38 +00:00
gdr-ftp
82f60994d2 mkboot:
Initial checkin; this script creates the installation boot
	disk, /gno.boot
mkdisk1, mkdisk2:
	Initial checkin; these scripts assist in the creation of the
	*.shk files for the binary distribution.
fudgeinstall:
	- added verbose flag to install(1) calls
	- don't "fudge" install gettytab or getty any more
	- make sure the mkso data files are copied over
1998-04-22 04:51:12 +00:00
gdr-ftp
2c52584063 initial checkin of GNO-formatted man page 1998-04-17 01:02:24 +00:00
gdr-ftp
d8638d7f83 Makefile:
Let the builds know that there is a GNO-formatted man page.
1998-04-16 06:33:45 +00:00
gdr-ftp
16efada45b login.1G:
initial checkin for GNO-formatted man page
Makefile:
	let the builds know about the new man page.
1998-04-16 06:32:28 +00:00
gdr-ftp
49214ecab2 initial checkin of GNO-formatted man page. 1998-04-16 06:18:48 +00:00
gdr-ftp
768c413e7c wall.1G:
Initial checkin of the GNO-formatted version of the man page.
1998-04-16 06:11:14 +00:00
gdr-ftp
df1aab9de6 last.1G:
Initial checkin of GNO-formatted version of the man page.
1998-04-16 06:06:15 +00:00
gdr-ftp
e2c6df7488 re.format.7:
Replaced "\(dg" with "***"; neither the current GNO nroff program
	nor groff used by Linux (on which the web versions of the man
	pages is generated) use "\(dg", which is supposed to be a dagger.
1998-04-16 05:52:39 +00:00
gdr-ftp
e8bcb53ed7 environ.7:
Updated to reflect the current implementation; some formatting
	and other minor changes were done.  No major change in content.
1998-04-16 05:29:17 +00:00
gdr-ftp
e2adcb9b2b environ.7:
Initial checkin.  This is the environ(7) man page as it was
	shipped with lenviron v1.1.3.
1998-04-16 05:11:54 +00:00
gdr-ftp
f589b65333 tty.4:
Finished converting this man page to nroff source (it was
	previously preformatted).
1998-04-16 05:03:39 +00:00
gdr-ftp
2495ce287f basename.3:
dirname now returns "." instead of "" for arguments containing
	no directory components
fgets.3:
	added a GNO note about streams opened in binary mode.
1998-04-11 19:13:41 +00:00
gdr-ftp
af6a5191a8 mkgen, describe.src:
minor changes to some URLs
1998-04-11 19:08:30 +00:00
gdr-ftp
6a7127aa10 Initial checkin. This file creates a web version of gno/NOTES/status.bin. 1998-04-11 03:23:23 +00:00
gdr-ftp
04e5cb4232 status.bin:
I did some formatting changes to make it easier for a perl
	script to parse this file and create a web page showing current
	status.  No change to content.
1998-04-11 03:20:13 +00:00
gdr-ftp
d6d81225de copyfile.c:
The last fix wasn't quite correct in that (for copying only data
	forks) the rez fork was still created but with zero length.
	This fix doesn't create the rez fork at all under those
	circumstances.
1998-04-10 21:36:08 +00:00
gdr-ftp
e8879227c8 basename.c:
If the argument provided to dirname(3) doesn't have a
	directory component, return "." instead of "".
1998-04-10 21:33:20 +00:00
gdr-ftp
50a2dce1b5 initial checkin for strftime(3) test program 1998-04-10 21:25:07 +00:00
gdr-ftp
ff4949a278 locale.h rune.h runetype.h:
- initial checkin.  No changes from the BSD versions other than
	  extra #include guards
1998-04-10 21:19:40 +00:00
gdr-ftp
6f8d3ed148 Updated entries for:
date, du, info, more, strings, tar, launch, write, getty, login
1998-04-10 20:28:36 +00:00
gdr-ftp
efd645f1ca Fixed an off-by-one error; removerez would abort with the usage message
if only one filename was given.
1998-04-10 20:19:24 +00:00
gdr-ftp
b9be5b37c2 compile.1:
added reference to link(1) man page.
1998-04-10 20:17:58 +00:00
gdr-ftp
b8915c9cd4 This is write version 2.1 from 8 March 1994. The manual page has been
converted from preformatted ascii to nroff source.  Leslie's email
address was also updated.
1998-04-10 20:03:55 +00:00
gdr-ftp
f91ed7c806 Initial checkin of Leslie Barstow's 1993 v1.0 write(1) implementation,
minus the man page.
1998-04-10 19:50:41 +00:00
gdr-ftp
49c374ec7c The launch(1) man page is now in the gno/usr.bin/launch directory,
so we don't need it here.
1998-04-10 19:43:49 +00:00
gdr-ftp
2553a92197 Initial checkin for launch(1). No changes yet for GNO v2.0.6.
The man page has been copied from the gno/usr.man/man1 directory,
from which it will be deleted.
1998-04-10 19:41:57 +00:00
gdr-ftp
e72e1c891f Initial checkin of what is believed to be tar v2.0. There was a
tar v2.0.1 binary distributed on the 'net that claimed to have fixed
an unspecified bug in this version, but neither the sources nor
the originator of that fix are available.

It may be appropriate to completely replace this implementation.
1998-04-10 19:30:29 +00:00
gdr-ftp
ade81f0a94 Initial checkin of the GNO v2.0.4 strings(1) util. No changes yet for
GNO v2.0.6, other than a GNO-formatted man page was created from the
BSD original.
1998-04-10 19:21:40 +00:00
gdr-ftp
e51b60e6cf These are changes that apparently bring the version number to 2.0.
However, judging from the comments at the top of the source file,
the v2.0 changes were based on more v1.31 rather than 1.4.  When
this program is updated, these diffs should be evaluated.  (Unless,
of course, the current version is tossed in favor of a recent BSD
derivative.)

Here are the comments for the changes from v1.31 to v1.4 that may have
been dropped while moving to v2.0.  See the cvs diffs for details:

> v1.4  - Termcap support has been added and tested.  Look for a soon to be
>         faster version coming soon to a ~/bin directory near you!
>
> v1.32 - uses isatty(x) instead of fstat.  more portable (opinion).
>         soon to be added, TERMCAP support, won't that be nice?
1998-04-10 19:10:01 +00:00
gdr-ftp
861f178146 Initial checkin of more v1.4. I've converted the manual page from
aroff source to nroff source so that it can go into the repository
(binary files are not handled well in cvs).
1998-04-10 19:02:04 +00:00
gdr-ftp
2a99711c42 Initial checkin. These have no modifications for GNO v2.0.6, other
than I assigned version numbers to previous releases.  The most current
was v1.4.  See the comments at the top of du.c.
1998-04-10 18:13:27 +00:00
gdr-ftp
027b934919 This is asm version 1.1 of date(1), also by Phil Vandry. There are still
no GNO v2.0.6 specific changes.
1998-04-10 18:03:48 +00:00
gdr-ftp
98f457ebec Initial checkin of asm version 1.0 of date(1) by Phil Vandry (no changes
for GNO v2.0.6).  I've not checked, but it's unlikely that this is
POSIX compliant.
1998-04-10 18:00:18 +00:00
gdr-ftp
45dd3d2857 fudgeinstall:
- use install(1) instead of cp(1) for now, since cp has been
	  observed to trash files.
	- changed installation locations to make use of /gno and /gno-hfs
	  partitions.
	- various changes to reflect which files have been updated
	  since the last time fudgeinstall was used.
1998-04-10 17:46:28 +00:00
gdr-ftp
8f71ef8237 namespace:
- added an entry for /tmp, since we cannot count on people having
	  this as a RAM- or other real disk when GNO is started.
	- make defaults use "/gno" and "/gno-hfs" as the *real* volume
	  names, rather than "/s21/dist" and "/s22/dist".

inittab, termcap, tty.config, ttys:
	added.
1998-04-10 17:08:36 +00:00
gdr-ftp
08a66d465e The /tmp directory will be empty during shipping. Put a file in there
to ensure that it gets extracted.
1998-04-10 17:00:43 +00:00
gdr-ftp
7d184b3391 Various changes to get getty compiling under GNO v2.0.6. In general
they are:
	- changed the makefile
	- prototyped functions
	- eliminated pathnames.h since all it does is #include <paths.h>
	- used gettytab.h for various function declarations
	- verified stack usage at 712 bytes
	- eliminated dummy gethostname() function.  Instead, get it
	  from libc.  This exposes a problem with gethostname.
	  See PR#59 for details.
	- eliminated a dependancy on strftime for the moment by
	  calling ctime() instead.
	- Added GNO-formatted versions of the man pages.
1998-04-10 16:18:06 +00:00
tribby
ddb82cb2e0 Remaining files for awk 2.0 that were left out of the previous checkin.
Maybe someday I'll become adept at using cvs...
1998-04-07 17:06:53 +00:00
tribby
0b6d503134 awk 2.0 for GNO/ME, including modified Bell Labs source code, test cases,
and output files for test case comparison. See README.gno for implementation
notes. NOTE: some test cases in tests/dotests are commented-out because
they depend on pipes working and/or the "sort" utility.
1998-04-07 16:19:01 +00:00
gdr-ftp
d522fa44b8 Changed entries for:
suspda, aroff, binprint, center, less, ls, make, makemake,
	mkdir, passwd, ps, purge, stty, test, time, touch, uname,
	upper, vi, renram5, alarm, apropos, aw30, awk, banner,
	basename, cal, calendar, cclean, ctags, describe, dirname,
	eps, fold, help, install, last, link, lseg, man,
	removerez, rlogin, rsh, tsort, wall, whatis, who, whois,
	udl, catman, cron, descc, descu, getty, login, newuser,
	newuserv, nogetty
1998-03-31 15:22:15 +00:00
gdr-ftp
109c7880bf initial checkin 1998-03-31 03:33:03 +00:00
gdr-ftp
f6f777413b - minor changes to fit into the GNO build 1998-03-31 03:29:10 +00:00
gdr-ftp
b1128f4c89 Makefile:
- fix a problem with the 'install' and 'release' targets
README:
	- added some comments on possible optimizations
1998-03-29 20:52:16 +00:00
gdr-ftp
ef3c68dfac - minor changes to build under the GNO base distribution 1998-03-29 20:47:12 +00:00
gdr-ftp
48574decdd - makefile changes to build under the GNO base distribution
- fixed a bug when the argument does not contain a directory delimiter
1998-03-29 20:46:17 +00:00
gdr-ftp
db224b5b07 - modifications for compilation under GNO v2.0.6 base build. See
the README for details of changes.
1998-03-29 07:16:25 +00:00
gdr-ftp
aa8b92ae3a stack.3:
- added some functions missing from the NAME line
	- added a description of __REPORT_STACK
1998-03-28 18:38:02 +00:00
gdr-ftp
9b6b8bb59a gno.h:
-added __REPORT_STACK macro
1998-03-28 18:36:43 +00:00
gdr-ftp
1157a5530f added a description and example of the _reportStack(3) routine 1998-03-28 16:47:51 +00:00
gdr-ftp
92ee492794 added the _reportStack(3) routine 1998-03-28 16:46:59 +00:00
gdr-ftp
04ed2e0e19 cvt.c:
Fix for PR#56 -- there is a kludge to modify the exponent for
	a converted value of zero, due to the way that SANE special-
	cases it.  This kludge was applied for all values that had a
	zero exponent; now do it only for the value zero.
1998-03-28 16:42:32 +00:00
gdr-ftp
70c2382176 describe.src:
- added entries for basename, checknr, dirname, m2o, mkobj, mktmp
	- updated entries for dialup, flex, lseg, wrap
template:
	- changed the default ftp location to ftp.gno.org
1998-03-26 00:32:01 +00:00
gdr-ftp
2105f032fc Initial checkin of basename(1) and dirname(1), as submitted by
Scott Moberly.  The only change was renaming of the makefiles.
1998-03-25 15:08:28 +00:00
gdr-ftp
62215a070f ChangeLog:
summarized all changes from 22 Dec 97 to the present
1998-03-25 06:06:34 +00:00
gdr-ftp
23b1d7acd2 Makefile:
corrected location of assert.o file
1998-03-25 06:05:46 +00:00
gdr-ftp
774f9b72ff copyfile.c:
When copying files, don't make it an extended file unless
	the original has a resource fork.
1998-03-25 04:04:20 +00:00
gdr-ftp
798d7a250c stdlib.h:
- added decls for ecvt and fcvt
	- deleted some extraneous #ifdefs
1998-03-25 03:53:34 +00:00
gdr-ftp
8c9a14c01e cvt.c:
The ecvt(), fcvt(), and __dtoa() routines were generally
	rewritten to address the problem of printing floating point
	numbers (they sometimes came out wrong, especially representations
	of zero).

	__dtoa was written from the description in the BSD sources (note
	that the comment of it being "like ecvt/fcvt other than truncating
	trailing zeros") is not quite accurate where it comes to the rve
	pointer or the printing of zero values.  __dtoa is still expected
	to be wrong for any modes other than 2 and 3, however those modes
	are not used by anything in libc yet.  Fix them when they pop up.

	BSD has not ecvt/fcvt routines, so these have been written based
	on the man page and observed behavior of the Linux implementation.
	There is no gcvt yet.
1998-03-24 16:20:30 +00:00
gdr-ftp
e9cd1d1fb9 Makefile:
getlogin.c was missing from the list of sources, and therefore
	getlogin(3), _getlogin(3), and setlogin(3) were missing from
	the build.
1998-03-24 16:10:35 +00:00
gdr-ftp
95aaac5172 bugs.html, index.html, Makefile:
- added interface to bug reporting system
related.html:
	- added reference to the "Cathedral and the Bazaar" paper.
	- added link to Byte Works' page.
1998-03-15 00:36:38 +00:00
tribby
923ca66cd6 Add comment about test files that should be built 1998-03-11 17:12:57 +00:00
tribby
e2b5e2e1ef These files should be built rather than kept in repository 1998-03-11 17:11:43 +00:00
gdr-ftp
a26d64bf05 The 'fulltests' script is now located in gno/build.tools 1998-03-11 05:28:01 +00:00
gdr-ftp
9a65f3585a fulltests:
This is a common test script used by many of the utilities.
1998-03-11 05:19:56 +00:00
gdr-ftp
cadd7ef99a libcrypt.rez:
- added rVersion
Makefile:
	- specify sources vice objects so that the new *.mk macros
	  work correctly.
1998-03-11 04:23:34 +00:00
gdr-ftp
227a5d4165 Initial checkin. These sources correspond to the GNO v2.0.4 build. 1998-03-11 04:09:28 +00:00
gdr-ftp
13962cbe8c Makefile:
- install to /usr/bin vice /bin
1998-03-11 03:10:31 +00:00
gdr-ftp
c910d74666 *.desc:
Changed trenco.myrias.com to ftp.gno.org
Makefile:
	install into /usr/bin vice /bin
1998-03-11 03:08:20 +00:00
gdr-ftp
6d45309184 Makefile:
- install to /usr/bin vice /bin
1998-03-11 03:04:57 +00:00
gdr-ftp
ece4e91a5e ctags.desc:
- changed trenco.myrias.com to trenco.gno.org
Makefile:
	- install the GNO version of the man page instead of the
	  BSD version
	- install into /usr/bin vice /bin
1998-03-11 03:02:18 +00:00
gdr-ftp
e846cb8f9a Initial checkin. Unfortunately, the getvers/setvers sources are still
missing; only the manual pages and README files are here.
1998-03-11 02:58:52 +00:00
gdr-ftp
63160f6291 Initial checkin; these sources should correspond to the GNO v2.0.4
version of this util.
1998-03-11 02:57:43 +00:00
gdr-ftp
fdf0d8d918 Initial checkin; these sources should correspond to those used to
build the GNO v2.0.4 version of this util.
1998-03-11 02:56:04 +00:00
gdr-ftp
35a4a5a916 startup.mk:
Explicitly specify the output file in default compilation rules.
	This is needed specifically for the GNO builds, but is also
	relevent to other uses of dmake.
1998-03-11 01:05:04 +00:00
tribby
7f83841bab Missing test files for tr (include binary chars) 1998-03-10 17:30:22 +00:00
tribby
7a381ec9a6 Missing test files for tr 1998-03-10 17:28:05 +00:00
tribby
a67838992c Reflect changes made in the latest Bell Labs version (980211). No GNO/ME
changes have been added yet.
1998-03-09 23:43:53 +00:00
gdr-ftp
451e159fb7 Initial checkin. These sources match those used to build the version
of the util shipped with GNO v2.0.4.
1998-03-09 15:50:56 +00:00
gdr-ftp
31e9970070 Initial checkin. This version of the sources matches that used to
build the GNO v2.0.4 distribution.
1998-03-09 15:30:26 +00:00
gdr-ftp
784e3de7cd Initial checkin of aroff, binprint, center, less, ls, make, makemake,
passwd, ps, purge, shutdown, stty, upper, and vi.  These sources are
for the versions of the utils shipped with GNO v2.0.4.
1998-03-09 08:30:21 +00:00
gdr-ftp
d00f2dadaa Makefile:
- updated to use the new *.mk files
inst.c:
	- include <gno/contrib.h> vice "contrib.h"
inst.rez:
	- added build date
1998-03-08 18:19:00 +00:00
gdr-ftp
ace3b43bec Makefile:
- deleted a bunch of commented-out lines that had been left
	  in by mistake
1998-03-08 18:16:03 +00:00
gdr-ftp
03cff8f7cc Makefile:
- updated for use with the new *.mk files
libtermcap.rez:
	- added build date
termcap.h:
	- added cvs ident string back in
1998-03-08 18:14:55 +00:00
gdr-ftp
8b1eeb2e86 Makefile:
- the rez fork rules is now in one of the *.mk files; don't
	  include it here
	- make sure the contrib.h header gets installed
libcontrib.rez:
	- added the build date
1998-03-08 18:11:50 +00:00
gdr-ftp
a3eaea8456 lib.mk:
Added $(LOCAL_SETUP) to the list of build targets, before
	$(LIBTARGET).  LOCAL_SETUP should be set in the lower makefiles
	if there is a target which must be made prior to the main
	compilation.
1998-03-08 18:09:03 +00:00
gdr-ftp
4ddaf23478 Makefile:
- modified for use with the new *.mk files
descc.rez, describe.rez, descu.rez:
	- added build date
1998-03-08 17:58:44 +00:00
gdr-ftp
4dffe7ddc2 Makefile:
use single colons for additional dependancies
udl.rez:
	added build date
1998-03-08 17:55:54 +00:00
gdr-ftp
06a5a0d916 Makefile:
- install the GNO man page, not the BSD one
	- place final binary in /usr/bin vice /bin
1998-03-08 17:51:04 +00:00
gdr-ftp
e44027ef07 Makefile:
- abbreviated some macros
	- use single colons on additional dependancies
tests/dotests, tests/fulltests:
	- changed paths for $testcmd and $trcmd
1998-03-08 17:49:45 +00:00
gdr-ftp
531859db70 Makefile:
- abbreviated some macros
	- removed the -v compilation flag (it can be added from the make
	  command line if necessary)
	- use single colons in additional dependancies
sed.desc:
	- expand the description a bit.
1998-03-08 17:46:32 +00:00
gdr-ftp
e42c4e0794 Makefile:
abbreviated some macros
tests/dotests, tests/fulltests:
	changed paths of $testcmd and $trcmd
1998-03-08 17:43:49 +00:00
gdr-ftp
7c0cc1c3d4 Makefile:
changed to handle the new *.mk files
help.rez:
	added build date
1998-03-08 17:40:55 +00:00
gdr-ftp
4028b2d317 Makefile:
- use single colon on additional dependancies
fmt.rez:
	- added build date
1998-03-08 17:38:25 +00:00
gdr-ftp
9103cfa195 Makefile:
abbreviated some macros
colcrt.desc:
	changed 'trenco.myrias.com' to 'ftp.gno.org'
tests/dotests, tests/fulltests:
	changed paths of $testcmd and $trcmd
1998-03-08 17:36:38 +00:00
gdr-ftp
9cdea96615 use single colons on additional dependancies 1998-03-08 17:33:34 +00:00
gdr-ftp
343bb80e9e dotests, fulltests:
Changed paths of $testcmd and $trcmd.
test.list:
	Deleted.  This file is test output and wasn't supposed to be
	checked in to begin with.
1998-03-08 17:31:08 +00:00
gdr-ftp
7c5d013345 Makefile:
abbreviated macros a bit
tests/dotests:
	changed path of $testcmd
tests/fulltests:
	changed path of $trcmd
1998-03-08 17:24:34 +00:00
gdr-ftp
0628df79bb Initial checkin; m16.gno is mostly a collection of stubs that allow
an alternate call interface to the kernel traps and some other library
functions.
1998-03-08 17:18:11 +00:00
gdr-ftp
cffe806766 binconst.mk:
Added MACGEN and MACGEN_FLAGS macros.

binrules.mk:
	Added a (normally empty) macro "LOCAL_SETUP" to the build target.
	If a utility needs a special target to be done prior to the
	main build, then it sets this macro to be that special target(s).

paths.mk:
	Added some comments on the OBJ_DIR directory.
1998-03-08 17:12:34 +00:00
gdr-ftp
7242272eb4 don't have a <termcap.h> in the gno/include directory; this header
file gets put into /usr/include from the directory gno/lib/libtermcap.
1998-03-06 06:24:48 +00:00
gdr-ftp
8e00576fbd status.bin:
- elimnated the "in archive" column
	- updated the following entries:
		gsi, suspda, tmterm, cat, chtyp, cmp, cp, df, false,
		head, kill, mv, pwd, rcp, rm, rmdir, sleep, split,
		tail, tee, test, time, tr, true, uname, uniq,
		wc, yes, asml, assemble, awk, catrez, cksum,
		cmpl, colcrt, compile, ctags, cut, ftp, getvers,
		last, link, rlogin, rsh, script, sed, setvers,
		sum, wall, whois, inetd, login
1998-03-06 05:55:30 +00:00
gdr-ftp
7027be9e4b vfscanf.c:
- Fixed a problem reported by Derek where stack trashing
	  was happening once an EOF was reached.  This was actually
	  only one example of a class of problems; any time __svfscanf
	  returned before filling all the requested arguments, va_arg
	  was left uncalled for some set of arguments.  This has been
	  fixed by adding a "stack cleanup" section to the code where
	  va_arg is called once for each remaining argument.
	- The __svfscanf routine still had large arrays on the stack.
	  These have been changed to static storage class.  There is
	  currently an assert in place to assure that recursion isn't
	  happening since I didn't have the chance yet to verify in
	  detail the control flow here.  This assert (and the related
	  use of the "recursing" variable) can be removed after such
	  a verification.
1998-03-04 06:20:03 +00:00
taubert
6822a8d18f - Fixed infinite loop in traceback()
- Misc. code cleanups
1998-02-22 05:05:54 +00:00
gdr-ftp
9416f9d55c - split the top level GNO docs web page into subpages
- add a file containing a list of man pages to ignore when building
  the html versions of the pages
1998-02-19 03:04:10 +00:00
gdr-ftp
9359f799f6 Makefile, yes.desc:
- change installation point from /usr/bin to /bin
1998-02-19 02:26:07 +00:00
gdr-ftp
59c00c1820 Makefile:
- change installation point from /usr/bin to /bin
1998-02-19 02:25:18 +00:00
gdr-ftp
31f7aea798 Makefile, uname.desc:
- change installation point from /usr/bin to /bin
1998-02-19 02:24:39 +00:00
gdr-ftp
a231c66c6b Makefile:
- added more dependancies
1998-02-19 02:23:42 +00:00
gdr-ftp
10a6b1846a tee.desc:
- updated "Contact", "Where", and "FTP" fields
1998-02-19 02:15:25 +00:00
gdr-ftp
70d9199214 Makefile:
- use single colon on extra dependancies
tail.desc:
	- only give directory for "Where" describe field
1998-02-19 02:14:26 +00:00
gdr-ftp
8ecdfc40b1 Makefile:
- install to /bin directory vice /usr/bin
1998-02-19 02:13:12 +00:00
gdr-ftp
55dc07fbcf Makefile:
- use single colon on extra dependancies
1998-02-19 02:12:18 +00:00
gdr-ftp
b36acdb112 Makefile:
- use single colons on extra dependancies
1998-02-19 02:05:06 +00:00
gdr-ftp
3d887aa334 Makefile:
- in the install and release targets, ensure that the installed
	  header file is of type SRC/CC, otherwise subsequent compilations
	  may fail.
1998-02-19 01:12:36 +00:00
gdr-ftp
79cc150685 Makefile:
- specify files via SRCS vice OBJS.  This eliminates an extraneous
	  ".o" in the final OBJS value.
	- don't attempt to attach a rez fork (leave it for the upper
	  level makefile)
1998-02-19 01:07:56 +00:00
gdr-ftp
7e3c77c4a2 Makefile, stack.asm:
- move generated macro file to /obj hierarchy
Makefile:
	- fix location of (non-generated) macro sources
	- specify files via SRCS vice OBJS.  This eliminates an extraneous
	  ".o" in the final OBJS value.
	- don't attempt to attach a rez fork (leave it for the upper
	  level makefile)
1998-02-19 01:05:17 +00:00
gdr-ftp
3c8936e8bc Makefile:
- eliminate double concatenation of resource fork
	- specify files via SRCS vice OBJS
	- obtain the assert object file from where it is built in
	  the ORCA hierarchy
libc.rez:
	- add build date to displayed data
1998-02-19 01:00:36 +00:00
tribby
bb39be07cc Fix the comment line before cleanup 1998-02-18 19:01:52 +00:00
tribby
3ad387440c Change a few comments to make them match the code:
- stack size is 1024, not 768
   - name of file is prog.mk, not gno.prog.mk
   - remove version number and date string at beginning, since it
     is updated in the id string
1998-02-18 18:22:04 +00:00
gdr-ftp
27924b88c4 Makefile, describe.src:
- updated describe/descc/descu to version 1.0.6
1998-02-18 00:29:28 +00:00
gdr-ftp
8543be29f7 submit.html:
- The describe-submit address is now active.  In fact, it has
	  been for some time; I just forgot to remove from this page
	  the note saying that it was not.
1998-02-18 00:24:09 +00:00
gdr-ftp
e58b811b55 - initial checkin of colcrt as submitted by Steve Reeves 1998-02-17 03:12:57 +00:00
gdr-ftp
872341978d - initial checkin of uname(1), as submitted by Steve Reeves 1998-02-17 02:50:55 +00:00
gdr-ftp
5cf814279c Makefile:
- back out v1.3 changes except for the requirement to use
	  the GNO vice BSD man page.
1998-02-17 02:44:05 +00:00
gdr-ftp
29f6c45c73 Makefile:
- backed out v1.3 changes
1998-02-17 00:35:18 +00:00
gdr-ftp
caf78f9f1c lib.mk:
- backed out v1.4 changes
	- replace .asm (as well as .c) suffixes with .o for OBJS definition
	- added a recipe for building ProDOS renamed object files
1998-02-17 00:33:08 +00:00
gdr-ftp
22fa70695a binconst.mk:
- changed definition of OBJS to remove the full pathnames
	  and to add to previous values of OBJS rather than to act
	  as a default value

binrules.mk:
	- backed out all v1.5 changes except for using $(MAINSRC)
	  vice $(MAIN).c
	- added a recipe for building ProDOS-renamed object files

paths.mk:
	- backed out v1.6 changes
	- added a macro, PRODOS_OBJS.  If this is set to "true", then
	  ProDOS-compliant file names will be used for object files.
1998-02-17 00:26:27 +00:00
gdr-ftp
d124889572 - initial checkin of <sys/utsname.h>. No diffs from the BSD version 1998-02-16 22:46:44 +00:00
gdr-ftp
b3a92e5811 - initial checkin of Steve's uname(3) implementation 1998-02-16 22:44:03 +00:00
gdr-ftp
0fd1522dd5 - added uname(3) man page 1998-02-16 22:40:15 +00:00
gdr-ftp
150b2eb2e2 paths.mk:
- with the modified binrules.mk, we don't need the .SOURCE
	  directives.

binconst.mk:
	- change the definition of OBJS somewhat so that they are
	  always fully pathed in the $(OBJ_DIR) directory
	- for utils with both BSD and GNO man pages, make sure we
	  install the GNO one
	- conditionally define MAINSRC so that we can override it
	  if necessary.  By default MAINSRC is $(MAIN).c

binrules.mk:
	- don't assume MAINSRC is $(MAIN).c
	- don't assume the compiled rez fork is in the current directory
	- add default target for creating object files in the $(OBJ_DIR)
	  directory
	- don't relink the executable if it just needs a new resource fork

binrelease.mk:
	- changed targets to allow for the BSD/GNO man page duality
	- assume the built program is in the $(OBJ_DIR)
	- eliminate describe actions from the 'install' target

prog.mk:
	- don't include binrules.mk if CUSTOM_RULES is defined and
	  non-NULL.
1998-02-15 19:44:03 +00:00
gdr-ftp
7eb6be5172 Makefile:
- modifications to allow the object files to be in the /obj
	  hierarchy.
	- rename the object files during the build such that they can
	  reside on a ProDOS partition.  An unfortunate consequence of
	  this is the requirement in this file for explicit recipes for
	  any of the renamed object files.

libnetdb.rez:
	- add an rVersion for the final library
1998-02-15 19:27:20 +00:00
gdr-ftp
6bafc3a9b4 lib.mk:
- fix definition of OBJS such that they can be placed in the /obj
	  hierarchy.  Also added some more default targets for the same
	  purpose.
	- added in a rule to append an rVersion resource to the library,
	  unless the NO_REZ macro is set in the makefile
1998-02-15 19:18:20 +00:00
gdr-ftp
2188b17ab9 Makefile:
- extract appending of the rez fork into a higher level *.mk file
liby.rez:
	- add in the build date automatically
1998-02-15 19:14:25 +00:00
gdr-ftp
bc7e61f040 Makefile:
- make all object files have ProDOS file names.  This doesn't
	  affect source files.
	- install GNO version of man page rather than the BSD one.

ftp.1G
	- fixed up some register interpolations that made the GNO
	  nroff puke
1998-02-15 00:31:01 +00:00
gdr-ftp
d08a55f17e Makefile:
- put cksum in /usr/bin vice /bin

cksum.1:
	- added "sum" to the NAME section so that whatis(1) gets a hit

cksum.rez:
	- added (initial test) of automatically displaying the build
	  date.

mkso.data:
	- used for making man page ".so links"

mklink.data:
	- used to replicate cksum(1) as sum(1)
1998-02-15 00:25:48 +00:00
gdr-ftp
3424f81f7c dotests:
- assume the program under test is in the /obj hierarchy rather
	  than the parent directory
fulltests:
	- use tr(1) out of /dist/bin instead of the /src directory
1998-02-15 00:22:31 +00:00
gdr-ftp
307e87bf3e Initial checkin. Items that have changed since the v2.0.4 release:
- basename(argv[0]) is verified to be one of "compile", "cmpl",
	  "assemble", or "asml", or an error is thrown.  The latter
	  two were not in the previous version at all.
	- Use the new GS/OS prefixes (>7)
1998-02-15 00:05:34 +00:00
gdr-ftp
2c9b8b7381 startup.mk:
- define REZ as "17/occ" versus "occ" so that dmake doesn't
	  have to search the PATH every time it calls $(REZ)
	- explicitly specify the output file for the default rule for
	  making *.r files.

builddate.rez:
	- This file is for inclusion by the various utility *.rez files
	  so that the build date can be displayed in a consistent format.
1998-02-14 23:56:40 +00:00
taubert
d9b5117780 Initial commit of wall program 1998-02-11 08:48:44 +00:00
tribby
99bb125e6e awk sources as taken from from Brian Kernighan's Web page at
http://plan9.bell-labs.com/who/bwk/

This is version 970821 without modification for GNO/ME compatibility.
It's being included in the repository to assist in importing future
versions of awk from Bell Labs.

----------------------------------------------------------------------
Added Files:
   awk/FIXES awk/README awk/awk.1 awk/awk.h awk/awkgram.y awk/b.c
   awk/lex.c awk/lib.c awk/main.c awk/makefile awk/maketab.c
   awk/missing95.c awk/parse.c awk/proto.h awk/run.c awk/tran.c
   awk/ytab.c awk/ytab.h awk/ytabc.bak awk/ytabh.bak
----------------------------------------------------------------------

 -- Dave Tribby
1998-02-10 04:26:47 +00:00
taubert
829e7d0929 Initial commit of last utility 1998-02-09 08:58:52 +00:00
taubert
6bd94b0884 Added support for separate object hierarchy and cleaned up libc makefiles 1998-02-09 08:45:21 +00:00
taubert
e0a16a3570 Makefile fixes for ftp and rsh 1998-02-09 08:32:56 +00:00
taubert
ed01d173df Move crypt support files from libc into libcrypt 1998-02-09 08:25:43 +00:00
taubert
804e124f69 Initial commit for login program 1998-02-09 08:19:25 +00:00
gdr-ftp
50bbda4498 - use the libcontrib out of /usr/lib rather than assuming that it's in
the source tree.
1998-02-09 04:02:21 +00:00
gdr-ftp
6f61169e81 Makefile: Cause the GNO- rather than the BSD-formatted manual page to
be installed for the 'install' and 'release' targets.
rcp.1G:   Changed formatting on two lines.
1998-02-09 04:00:37 +00:00
tribby
16f471c5eb Original checkin of kill source code from Dave Tribby 1998-02-09 00:19:25 +00:00
tribby
888214a8bd Original GNO code for kill tests from Dave Tribby 1998-02-08 23:47:18 +00:00
gdr-ftp
de6388b9b9 removed test files used for checking the "CR-check" commit script 1998-02-08 23:26:58 +00:00
gdr-ftp
c0e682c624 this is a check of the CR-check "filter". 1998-02-08 23:19:49 +00:00
gdr-ftp
ba28616f66 second try 1998-02-08 21:59:22 +00:00
gdr-ftp
82771a5ee8 This file should not make it into the repository. If it does, have
patience ... I'm doing some CVS configuration changes.
1998-02-08 21:56:55 +00:00
gdr-ftp
6bfb3527a9 - Makefiles now have common 'release' and 'install' targets
- most Makefiles now use gno/lib/lib.mk (not all of libc has been
  done yet)
1998-02-08 03:47:40 +00:00
gdr-ftp
c8e574bab7 crypt.c, crypta.asm:
- missed some renames of symbols when the namespace pollution
	  problem was addressed.  Hopefully this fixes the unresolved
	  symbols.  Untested.
1998-02-08 03:20:25 +00:00
gdr-ftp
f3bea84880 - changed the location where the macro source files are expected to be
found to reflect the directories now recommended in the FAQ.
- added a resource fork with an rVersion.
- use catrez instead of copyfork
- make 'install' and 'release' targets consistent with the rest of
  the GNO builds.
1998-02-08 03:16:55 +00:00
gdr-ftp
17aad04201 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.
1998-02-07 06:40:11 +00:00
gdr-ftp
8a732d9bc6 - updated gzip entry
- updated Joseph Lee's email addresses
1998-02-05 20:49:57 +00:00
tribby
a4b9acdd70 This is Dave, completing Devin's setup test 1998-02-05 20:41:00 +00:00
gdr-ftp
5e645be936 - removed makefile.mk; it was only used for mkso (which has moved to a
different directory)
- at Derek's request, added the dmake startup.mk file that I (Devin) use
  for /usr/lib/startup.mk.  (This file is expected to be in /usr/local/lib
  unless you have set up your environment to change the location.)
1998-02-05 16:37:02 +00:00
gdr-ftp
716edaa21b - (crypta.asm) move all functions into the *.o file. The first one was
getting put into the *.root file.
1998-02-05 16:07:06 +00:00
gdr-ftp
e712a9ff58 - fixed a bug (found by Steve Reeves) where the check for an out-of-bounds
errno was never catching illegal errnos, and thus could walk off the
  end of the message array.
1998-02-04 15:16:19 +00:00
gdr-ftp
4b239cd6da - utime(2) test: print access and modification times before exiting 1998-02-04 07:26:53 +00:00
gdr-ftp
c3959c4d16 - scanf test. Verifies the operation of scanning floats 1998-02-04 07:24:39 +00:00
gdr-ftp
6bae989841 - when making html versions of the man pages, skip files that appear
not to be GNO man pages, despite the file name.  Be verbose about it.
1998-02-04 07:17:13 +00:00
gdr-ftp
bd5fc8b991 - fixed newline problems 1998-02-03 08:08:40 +00:00
gdr-ftp
1259e1599f - initial checkin of the GNO-formatted man page for ftp(1). 1998-02-03 08:01:01 +00:00
gdr-ftp
c4ecb61d8b Initial checkin of SIM sources. This includes both simlib and SIM,
itself.
1998-02-03 07:54:12 +00:00
taubert
3036f145f1 Initial commit of GNO kernel and drivers 1998-02-02 08:20:59 +00:00
tribby
1d35e22c64 This is a test checkin from Devin, pretending he's Dave. 1998-01-30 18:36:03 +00:00
gdr-ftp
509f84b6f9 - fixed up .TH line to use the GNO formatting conventions 1998-01-27 16:02:54 +00:00
gdr-ftp
b6b44f7d83 - fixed generation of html man pages; the section number was being
listed twice in the <title> block.
1998-01-27 06:25:34 +00:00
gdr-ftp
4f4a589bf7 Makefile, README, index.html, intro.tex, unaval.html:
- changed occurances from trenco.myrias.com to either ftp.gno.org
	  or www.gno.org, as appropriate

index.html:
	- make reference to post-v2.0.4 patches avail from ftp.gno.org
	- deleted reference to Soenke's describe database (obsolete),
	  replaced it with ref to the hosted by www.gno.org

mkhtmlman:
	- fixed bug where a non-man-page file was picked up by this script
	  out of the gsh source directory.
	- man pages may appear now as both name.n and name.nG, where the
	  "n" is the section number.  If both files appear, then the former
	  is BSD-formatted source and the latter is GNO-formatted source.
	  Make sure we're only picking up the latter.
1998-01-26 07:13:14 +00:00
taubert
988e0fb1dc - the BSD-formatted man page is now who.1 and the GNO-formatted man
page is who.1G
1998-01-26 06:18:13 +00:00
taubert
a7b5aa5c8a First libcurses commit with changes for GNO 1998-01-26 06:09:49 +00:00
taubert
4079986d8b Created lib.mk as a replacement for <bsd.lib.mk> 1998-01-26 05:49:05 +00:00
gdr-ftp
e51733b21a - the BSD-formatted man page is now rcp.1 and the GNO-formatted man
page is rcp.1G
1998-01-26 05:25:18 +00:00
gdr-ftp
7a0a150111 - the BSD-formatted man page is now ctags.1, and the GNO-formatted one
is ctags.1G
1998-01-26 05:22:38 +00:00
gdr-ftp
272fd7918a - eliminate the definition and use of the macros INCLUDE_GNO, INCLUDE_ORCA,
and INCLUDE_GNO_ALT.  The directories specified in 13/orcacdefs/defaults.h
  are now assumed to be correct.  When building lib/libc/stdio/vfprintf.o,
  these directories have to explicitly stated the makefile for the moment.
1998-01-26 00:44:25 +00:00
taubert
f53219715c Bring who up to snuff with rest of source tree 1998-01-25 23:36:30 +00:00
gdr-ftp
320f77f2b4 - changed nroff source to be of the style understood by GNO's nroff. 1998-01-25 21:22:20 +00:00
gdr-ftp
61adaadfbe - update the "path" pragma to reflect the new location of the ORCA/C
header files, as specified in the FAQ.
1998-01-25 21:05:28 +00:00
gdr-ftp
2d3f7dce1a - floating point conversion specifiers were disabled, leading to stack
errors if they were used.  They have been reenabled.
1998-01-25 21:03:48 +00:00
gdr-ftp
676fccce0c - fixed some off-by-one errors in day fields. Errors found and fix
provided by Steve Reeves.
1998-01-25 21:01:55 +00:00
gdr-ftp
ebe6b4168b - some #endif's had (illegal) trailing text. Made this text into comments. 1998-01-25 20:58:56 +00:00
gdr-ftp
12ab1893b4 - changed (via bsd2man script) nroff source to style understood by the
GNO version of nroff.
1998-01-25 20:56:00 +00:00
gdr-ftp
b1fefe20fb - made the formatting in the Synopsis section match the style used
by other manual pages.
1998-01-25 20:17:48 +00:00
gdr-ftp
2159dfd5c6 - changed all occurances of "Orca" to "ORCA", as is the correct name 1998-01-25 18:03:45 +00:00
gdr-ftp
8ac226b323 - fixed a typo and a formatting problem (bolding was on too much text) 1998-01-25 18:02:12 +00:00
gdr-ftp
42bf1ff204 Delete files that existed only for testing remote CVS and the gno-cvs
mailing list.
1998-01-25 09:16:56 +00:00
gdr-ftp
91db35f9e3 and yet again. (zmailer alias was wrong) 1998-01-25 09:08:21 +00:00
gdr-ftp
28a204b58d yet another test. Trying to get archive files working 1998-01-25 09:03:50 +00:00
gdr-ftp
f8ce91e7b0 testing the majordomo software 1998-01-25 08:49:26 +00:00
gdr-ftp
ec41fa4eca Derek:
This is a test of sending commit messages to an email "list".
Actually, it's just an email alias at the moment; the mailing list
will follow.  What you're seeing here would normally be the commit
message.

You should receive two copies of this message since I'm checking
in files in two different directories.

Please make a reply to one of these messages.  If everything is set
up correctly, it should go to the gno-devel list.  Thanks.
1998-01-25 02:40:33 +00:00
gdr-ftp
e8799c7146 and again... 1998-01-25 02:23:24 +00:00
gdr-ftp
d4266d7ec0 yet another test commit 1998-01-25 02:14:25 +00:00
gdr-ftp
0e9776a3d3 This is a test of the emergency warning walrus. 1998-01-25 02:08:04 +00:00
gdr-ftp
8d67873c2b added another test line 1998-01-25 02:05:43 +00:00
gdr-ftp
aaf4e446cd This is a test of the commit email system.
This is another line.

And another.
1998-01-25 02:01:53 +00:00
gdr-ftp
a6a93e984a and another one
more text

bork bork
1998-01-25 01:08:38 +00:00
gdr-ftp
3883c24d20 bork 1998-01-24 20:05:55 +00:00
gdr-ftp
950a9aa0f8 testing checkin message mechanism 1998-01-24 20:04:30 +00:00
taubert
951ec8e48d Initial commit of inetd daemon 1998-01-24 08:35:51 +00:00
taubert
d352e8757c Initial commit of rlogin utility 1998-01-24 08:31:02 +00:00
taubert
767546b525 Initial commit of whois utility 1998-01-24 08:25:03 +00:00
taubert
c7b1d54b03 Initial commit of ftp utility 1998-01-24 08:21:33 +00:00
taubert
715fc5ab81 Initial commit of rsh utility 1998-01-24 08:14:04 +00:00
taubert
bb09eed7f6 Initial commit of ctags utility 1998-01-24 07:59:11 +00:00
taubert
3e68d4bd15 Initial commit of rcp utility 1998-01-24 07:35:26 +00:00
taubert
75831c8124 Initial commit of netdb library 1998-01-24 07:05:48 +00:00
gdr-ftp
418ae96ccb For the "--" delimiting a .sig, the dashes may be followed by whitespace. 1998-01-23 22:39:30 +00:00
gdr-ftp
0cea80dacc - always link to the most up-to-date describe source, as defined by
the makefile
- fixed wrong html used for a quote
1998-01-23 22:38:16 +00:00
gdr-ftp
44382837b2 The desc.db.shk file was listed as being in the wrong directory. 1998-01-23 22:37:04 +00:00
gdr-ftp
94f675832e - updated comments at top of file
- changed all occurances of trenco.myrias.com to ftp.gno.org
1998-01-23 07:00:06 +00:00
gdr
1c46c03e78 added 'nuke' target for cleaning out publicly visible web pages 1998-01-17 21:33:10 +00:00
gdr
f5e4958c4e Updated entries for describe, descc, descu to v1.0.5. 1998-01-17 21:30:28 +00:00
gdr
6ca306ec57 Generate sorted-by-classification pages. 1998-01-17 21:27:25 +00:00
gdr
a029903025 Added a "fudge list" for utilities where we know which class(es) they're
in, but that for some reason don't reference the describe database in
the .index.src files.
1998-01-17 21:26:42 +00:00
gdr
871932548b - added *~ files to list of files removed by the 'clobber' target 1998-01-17 21:21:05 +00:00
gdr
9f794ac7d0 - added the list of as-yet unsorted utils
- fixed some links
1998-01-17 21:19:55 +00:00
gdr
9e8a7cb703 Added a comment that the describe-submit mailing address is not yet
ready for use.
1998-01-17 21:19:00 +00:00
gdr
75febf71c3 The precompiled database can now be made on a Linux machine. 1998-01-17 08:29:22 +00:00
gdr
51b2bbcf92 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
		alignment to the offset entry, which provides binary
		compatibility of the precompiled database file between
		the IIgs and little-endian 32-bit machines such as
		Linux boxes.

		*** THIS MEANS THAT THE PRECOMPILED DATABASE IS NO LONGER
		    BINARY COMPATIBLE WITH EARLIER VERSIONS.

	Updated descu so that the "Last Updated" line in the describe
		source "header" is updated to reflect the current date
		and time (GMT, if supported).
	Fixed a bug in descu that caused the "header" to be slowly eaten,
		one character at a time.
	The describe database source file is no longer part of this
		archive.  It is available separately from the url,
		above.
	Added a "Known Bugs" section and URLs on where to find the
		online database to this README.  Modified the installation
		instructions a bit.
1998-01-17 07:20:07 +00:00
gdr
be853ae490 Initial checkin as submitted by Dave Tribby. 1998-01-16 04:16:17 +00:00
gdr
c3f0249dc8 Initial checkin for describe web pages. 1998-01-14 05:10:21 +00:00
1380 changed files with 172276 additions and 12679 deletions

View File

@ -2,7 +2,43 @@
# This file is intended for use with dmake. There are constructs in
# here that (as yet) make it unsuitable to be used on the GS.
#
# $Id: Makefile,v 1.5 1997/12/22 01:11:08 gdr Exp $
# $Id: Makefile,v 1.6 2012/08/26 02:54:57 gdr Exp $
#
.INCLUDE: /src/gno/paths.mk
INSTALL *= /usr/bin/install
CHTYP *= /bin/chtyp
headerInstall .USESHELL:
$(CHTYP) -lasm $(SRC_DIR)/gno/ainclude/m*
$(CHTYP) -lrez $(SRC_DIR)/gno/rinclude/*.rez
$(CHTYP) -lcc $(SRC_DIR)/gno/include/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/arpa/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/gno/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/machine/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/net/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/netinet/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/protocols/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/rpc/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/include/sys/*.h
$(CHTYP) -lcc $(SRC_DIR)/gno/orcacdefs/*.h
$(INSTALL) $(SRC_DIR)/gno/ainclude/m* /usr/ainclude
$(INSTALL) $(SRC_DIR)/gno/rinclude/*.rez /usr/rinclude
$(INSTALL) $(SRC_DIR)/gno/include/*.h /usr/include
$(INSTALL) $(SRC_DIR)/gno/include/arpa/*.h /usr/include/arpa
$(INSTALL) $(SRC_DIR)/gno/include/gno/*.h /usr/include/gno
$(INSTALL) $(SRC_DIR)/gno/include/machine/*.h /usr/include/machine
$(INSTALL) $(SRC_DIR)/gno/include/net/*.h /usr/include/net
$(INSTALL) $(SRC_DIR)/gno/include/netinet/*.h /usr/include/netinet
$(INSTALL) $(SRC_DIR)/gno/include/protocols/*.h /usr/include/protocols
$(INSTALL) $(SRC_DIR)/gno/include/rpc/*.h /usr/include/rpc
$(INSTALL) $(SRC_DIR)/gno/include/sys/*.h /usr/include/sys
$(INSTALL) $(SRC_DIR)/gno/orcacdefs/*.h /lib/orcacdefs
#
# The remaining macros, targets, and recipies were used before trenco
# was fully serving the GNO stuff.
#
XFER = xfer
TMP = /tmp/gnobuild

21
NOTES/MANIFEST Normal file
View File

@ -0,0 +1,21 @@
INSTALL Explains how to install the binary distribution. (Obsolete.)
MANIFEST This file.
README.beta Out of date notes. (Obsolete.)
README.src Out of date notes. (Obsolete.)
archives Shows the breakdown of how the GNO binary distribution
is currently shipped.
devel Directory containing notes intended for developers working
on the base distribution.
deviations Lists the ways in which GNO is known to deviate from
the POSIX specification and/or the BSD implementations
on which components of GNO are based.
headers These are some notes on how headers have changed from
v2.0.4 to v2.0.6
notes.960227 Notes to Derek. Should be moved/updated. (Obsolete.)
status.bin This lists the status of the various programs in the base
distribution.
status.lib This lists the status of the routines in the libraries of
the base distribution.
status.usrman This lists the status of the files in the src/gno/usr.man
directory hierarchy.
update.usrman This is a script to help keep status.usrman current.

View File

@ -1,7 +1,7 @@
$Id: README.beta,v 1.1 1997/03/11 08:08:06 gdr Exp $
$Id: README.beta,v 1.2 1999/07/03 14:46:37 gdr-ftp Exp $
This is the README file for release beta 970304. It probably needs more
detail. Mail to gno-beta@myrias.com with questions, comments, bitches,
detail. Mail to gno-beta@gno.org with questions, comments, bitches,
queries, complaints.
I suggest you don't mix these files up with those from other versions of

View File

@ -1,4 +1,4 @@
$Id: README.src,v 1.1 1997/03/11 08:08:06 gdr Exp $
$Id: README.src,v 1.2 1999/07/03 14:46:37 gdr-ftp Exp $
Have a look in the NOTES directory, especially the files "status"
and "notes.*". There are notes in there on changed header files --
@ -26,6 +26,6 @@ THEY WERE COMPILED, since struct FILE has changed. See the comments in
the NOTES/README.beta and orcacdefs/defaults.h files.
Also as a reminder, the gno-beta mailing list has been set up. To
join it, send email to <majordomo@myrias.com> with the following text
join it, send email to <majordomo@gno.org> with the following text
and nothing else in the body of the message:
subscribe gno-beta

View File

@ -1,157 +0,0 @@
*******
* soon
*
* $Id: TO.DO,v 1.7 1997/12/22 01:20:23 gdr Exp $
*
*******
Finish index in kernel reference manual.
in stack(3) man page, the user shouldn't have to allow for extra
bytes for _assertStack(3). Determine what is necessary. If the
number of bytes left is less than this value, then print out
an abbreviated error message rather than calling errx.
Verify if cp or gshk is corrupting the "fudgeinstall" script.
Add implementations for Tilghman:
strftime(3)
Incorporate Tilghman's setttimeofday(2) routine.
Update funopen, fropen, fwopen, fsettext man pages:
If a user wants binary mode, he has to call fsetbinary
on the resulting file pointer; this info is not carried
over from the previous file pointer.
Create a src/gno/build.tools/dupfile script for duplicating binary
files at user install time. Current packages that need this:
compress/zcat
sum/cksum
Complete mkso util
As a group:
Update utmp.5, libutil (logout, logwtmp), last(1), login(1), who(1),
w(1), init(8), _PATH_UTMP (<utmp.h> and FAQ), rwho(1), users(1)
Add to relevent util man pages:
.SH ATTRIBUTIONS
This command was ported from FreeBSD source code
for distribution with GNO/ME 2.0.6.
Use __STACK_CHECK__ macro for stack checking code.
stdio:
- add %b modifier to fprintf implementation (ORCA/C compatibility)
stdlib/cvt.c:
- handle modes 0 and 1 correctly.
Use result of _setModeEmulation(3) in appropriate calls. These include
chmod -
fchmod -
creat - done
open - done
stat - unnecessary
fstat - unnecessary
lstat - unnecessary
clean up <gno/kerntool.h> -- some require errno args, some don't. Some
can't be specified here, but most traps can.
check up on the type of nlink_t, used in stat(2)
Write a test that handles:
- negative process numbers
- process numbers exceeding INT_MAX and UINT_MAX
the easiest way to do this is to repeatedly exec a program that prints
it's process number. Keep doing so until either the number wraps or
the machine crashes.
libc/sys/exec.c:
buildCmd should single-quote strings containing whitespace.
If the string already has single quotes, then backspace them.
buildPath should only return files of type S16, EXEC, or EXE.
buildPath should use the mapPath facility.
These functions should operate closer to GS/OS when possible.
Also need to reduce stack requirements.
For the exec* functions, there should be a test for whether
or not the file is of type SRC and auxtype EXEC. If that
is the case, and if the first two characters of the file
are '#!', then the shell should be exec'd instead. (currently,
shell scripts cannot be exec'd)
NEED TO WRITE OR DUPLICATE MAN PAGES FOR
----------------------------------------
login libc(3)
login_tty
regexp libc(3)
termcap libc(3)
queue 3
tty 4
grp 5
passwd 5
termcap 5
ms 7
man 7
cron 8
runover 8 (obsolete?) No, needed for single user mode.
dialup 8
*******
* defer
*******
libc/sys/syscall.c:
for unlink, if file is open, then register a call to unlink
(non-recursive) the file via atexit(3)
[not practical?]
libc/gen/environ.c:
Review routines. Force them to use GSString routines, reduce
stack usage (depend on dynamic allocation for parm blocks).
libc/gen/err.c:
Use syslogd if not on a tty.
libc/gen/tty.c:
review these routines
do intro man pages:
1 done
2 review DEFINITIONS section
3 done
4 done
5 done
6 done
7 done
8 done
Add locale implementation to libc.
various man pages:
add note under COMPATIBILITY as to whether the routines
are thread-safe. If they write any globals or static
variables, they are not.
Verify that the setdebug(2) macros in gno/gno.h are correct.
Add implementations for execle; the final
envp can't appear in the prototype, but it can be found since it is
the last argument after the first NULL pointer.
man(1) implementation: create a database in the user's home directory
that contains a list of all man pages and their locations, based
on MANPATH. Keep a magic number the file to see if MANPATH has
changed. *maybe* check the date of the file against the
modification date of the respective directories and generate a
warning if the db is out-of-date.

24
NOTES/archives Normal file
View File

@ -0,0 +1,24 @@
$Id: archives,v 1.1 1999/01/09 21:28:35 gdr-ftp Exp $
A GNO "release" is shipped (so to speak) as a set of NuFX (*.shk) archives.
This is the breakdown of each NuFX archive:
gnoboot.shk /gno.boot (entire volume)
gno.01.shk /kern
/initrc
/lib
gno.02.shk /bin (utils a-f)
gno.03.shk /bin (utils g-m)
gno.04.shk /bin (utils n-s)
gno.05.shk /bin (utils t-z)
gno.06.shk /usr/bin (utils a-f)
gno.07.shk /usr/bin (utils g-m)
gno.08.shk /usr/bin (utils n-s)
gno.09.shk /usr/bin (utils t-z)
gno.10.shk /usr/include
gno.11.shk /usr/man/man1
gno.12.shk /usr/man/man2
gno.13.shk /usr/man/man3
gno.14.shk /usr/man/man[45678]
gno.15.shk /usr (remaining files)
gno.16.shk / (remaining files)

7
NOTES/devel/MANIFEST Normal file
View File

@ -0,0 +1,7 @@
MANIFEST This file.
TO.DO A list of things that still have to be done for GNO. These
really belong in the bugs database at http://www.gno.org
as either bugs or feature requests.
adding.utils Discusses stuff necessary to add utils to the base
distribution.
doing.builds Explains how to create the base builds.

View File

@ -1,10 +1,35 @@
*******
* soon
*
* $Id: TO.DO,v 1.7 1997/12/22 01:20:23 gdr Exp $
* $Id: TO.DO,v 1.8 1998/10/31 19:14:49 gdr-ftp Exp $
*
*******
When building the binary release, include all the system stuff like
GNOSnooper, et al.
We need a namespace(5) manual page. Here is a "bugs" entry for it:
Apropos of building a bootable system, I've also encountered another
bug. One cannot use a "partition" defined in /etc/namespace as the
home directory for any user. For example, one cannot use "/root" as
root's home directory unless it is a real volume. The symptoms of
this are:
1. You will get a error about "Device not found"
2. The user's gshrc file will not have been sourced.
Make the source *.shk archive on trenco use proper file types.
The header files <curses.h>, <sys/termios.h>, and <sys/ioctl.compat.h>
have conflicting definitions for FLUSHO.
newuser, newuserv:
- update to use /home vice /user or maybe a conf file
- check out behavior of 'adduser', see if there's anything
missing
vfscanf.c:
After a reasonable time, disable the assert calls.
Finish index in kernel reference manual.
in stack(3) man page, the user shouldn't have to allow for extra
@ -12,25 +37,14 @@ bytes for _assertStack(3). Determine what is necessary. If the
number of bytes left is less than this value, then print out
an abbreviated error message rather than calling errx.
Verify if cp or gshk is corrupting the "fudgeinstall" script.
Add implementations for Tilghman:
strftime(3)
Incorporate Tilghman's setttimeofday(2) routine.
Update funopen, fropen, fwopen, fsettext man pages:
If a user wants binary mode, he has to call fsetbinary
on the resulting file pointer; this info is not carried
over from the previous file pointer.
Create a src/gno/build.tools/dupfile script for duplicating binary
Create a src/gno/build.tools/mklink script for duplicating binary
files at user install time. Current packages that need this:
compress/zcat
sum/cksum
Complete mkso util
As a group:
Update utmp.5, libutil (logout, logwtmp), last(1), login(1), who(1),
w(1), init(8), _PATH_UTMP (<utmp.h> and FAQ), rwho(1), users(1)
@ -40,8 +54,6 @@ Add to relevent util man pages:
This command was ported from FreeBSD source code
for distribution with GNO/ME 2.0.6.
Use __STACK_CHECK__ macro for stack checking code.
stdio:
- add %b modifier to fprintf implementation (ORCA/C compatibility)
@ -57,9 +69,6 @@ Use result of _setModeEmulation(3) in appropriate calls. These include
fstat - unnecessary
lstat - unnecessary
clean up <gno/kerntool.h> -- some require errno args, some don't. Some
can't be specified here, but most traps can.
check up on the type of nlink_t, used in stat(2)
Write a test that handles:
@ -109,6 +118,8 @@ NEED TO WRITE OR DUPLICATE MAN PAGES FOR
* defer
*******
investigate using dynamic libraries (RTLs)
libc/sys/syscall.c:
for unlink, if file is open, then register a call to unlink
(non-recursive) the file via atexit(3)
@ -146,12 +157,3 @@ Verify that the setdebug(2) macros in gno/gno.h are correct.
Add implementations for execle; the final
envp can't appear in the prototype, but it can be found since it is
the last argument after the first NULL pointer.
man(1) implementation: create a database in the user's home directory
that contains a list of all man pages and their locations, based
on MANPATH. Keep a magic number the file to see if MANPATH has
changed. *maybe* check the date of the file against the
modification date of the respective directories and generate a
warning if the db is out-of-date.

95
NOTES/devel/adding.utils Normal file
View File

@ -0,0 +1,95 @@
$Id: adding.utils,v 1.1 1999/01/09 21:19:58 gdr-ftp Exp $
General
-------
You should read this file if you are contemplating adding utilities
to the base GNO distribution.
The first question is whether or not your utility belongs with the
base distribution. The criteria are loose, but if it is a commonly
used utility among the majority of GNO users, or if it is required
for building GNO itself, it may be incorporated into the base
distribution. If you think your utility matches these criteria,
contact Devin Reade <gdr@trenco.gno.org>.
Source Code
-----------
There is no restriction to which source language you use. If you have
successfully written a program written in something other than ORCA/C
or ORCA/M, please share your observations with the GNO development group
regarding using these other languages.
[talk about hierarchy in the src directory]
It should be clear from the *source* exactly from where the original code
came. In the case of GNO base distribution utilities ported from BSD,
changes should be reviewed by the GNO development team.
Mandetory Makefile Targets
--------------------------
Documentation Requirements
--------------------------
For utilities that become part of the GNO base distribution, there
are three *required* documentation files:
1. A manual page. Ensure that it is using a format understood
by the GNO version of nroff. BSD manual pages do not
usually fall into this category. Some utilities have both
a GNO and a BSD man page. In this case, the BSD man page
has a suffix of (for example) ".1" while the GNO version
has a suffix of ".1G". In either case, the suffix of the
manual page after installation should be ".1". See the
ftp(1) source for an example.
2. A describe(1) entry.
3. A rez source file containing an rVersion entry. This
will become (part of) the program's resource fork.
This file may contain other resources as well. Some
common ones include rComment and rProgInfo entries.
The GNO FAQ has information on where samples of these documentation
files may be found.
Other documentation files can be included as necessary. These include
but are not limited to READMEs, ChangeLogs, and reference manuals.
The README or other documentation should contain the following information:
1. Who wrote or ported the program.
2. How the maintainer may be contacted.
3. A list of what features have been tested.
4. The copying status; is it freeware, public domain, shareware,
copyleft, or something else?
There should be a detailed record of what changes have been made for
the various versions. Small projects can have this information in the
README file; large projects should use a separate ChangeLog.
RCS/CVS Identifiers
-------------------
When you're working on your utils please include, in comments near the
top of each file, the character sequence "[Dollar sign]Id[Dollar sign]"
(minus the quotes, and with [Dollar sign] repaced by '$'). This is an
RCS identifer. (RCS is the Revision Control System. CVS, the Concurrent
Versions System, depends on RCS.) Adding in the RCS identifier will
cause the version number associated with each file in the repository to
be displayed (and automatically updated) in each file.
You should *not* add a RCS identifier to your describe(1) entry file.
These files are cat'd together later when creating the database,
and the RCS identifiers do not belong in the database.
Note that some sources (notably some BSD files) already have such a string.
In these cases, you need not add another. An expanded string looks
something like this:
$Id: adding.utils,v 1.1 1999/01/09 21:19:58 gdr-ftp Exp $
When the sources are released, a 'cvs export' will be done which will
keep the version number intact, even if someone at a remote site decides
to import it into their own repository.

102
NOTES/devel/doing.builds Normal file
View File

@ -0,0 +1,102 @@
$Id: doing.builds,v 1.2 1999/01/27 06:27:59 gdr-ftp Exp $
This file describes how to build the GNO base distribution. It is critical
that things be done in the sequence given here, as there are dependencies.
The default target in each Makefile is 'build'; it causes the program or
library to be built in the /obj hierarchy. Each Makefile also has a
'release' target, which caused built or verbatim files to be copied into
the /dist hierarchy.. Both of these must be made before you proceed to the
next step.
All Makefiles also have an 'install' target, but that is only used for
installing into a live system. Caveat Emptor.
- The first thing is to ensure that your system header files match those
in the distribution. This is done by the following commands:
cd /src/gno
dmake headerInstall
- Next, the libraries have to be built in the following sequence. Each
of them should get a 'dmake build' followed by a 'dmake release':
/src/lib/orcalibs/Source/ORCALib
/src/lib/orcalibs/Source/SysFloat
/src/lib/orcalibs/Source/SysFPEFloat
/src/gno/lib/lsaneglue
/src/gno/lib/libc (build top level last, or there won't be rez fork)
/src/gno/lib/libcontrib
/src/gno/lib/libcrypt
/src/gno/lib/libcurses
/src/gno/lib/libedit (not yet building)
/src/gno/lib/libsim (not yet building)
/src/gno/lib/libtermcap
/src/gno/lib/libutil
/src/gno/lib/liby
/src/gno/lib/netdb
- Now you want to build each of the (finished) programs in the following
directory hierarchies. The sequence doesn't really matter. You need
to do both 'dmake build' and 'dmake release'.
/src/gno/bin
/src/gno/usr.bin
/src/gno/usr.orca.bin
/src/gno/usr.sbin
/src/gno/sbin
Note that not all checked in programs are necessarily finished, and
therefore suitable for the 'build' and 'release' targets. When in doubt,
check the file /src/gno/NOTES/status.bin.
(need to add text about the sys and kern directories)
- when the builds are closer to a sane state the /dist hierarchy
will be used to directly make a distribution. However for now,
we make use of another hierarchy, /gno into which we copy the
/dist hierarchy. The /gno hierarchy is then topped up with files
from a v2.0.4 distribution.
- so, once the 'release' target has been made in all the relevent source
directories, the following must occur:
- start with all of the following volumes empty. They may either be
physical volumes, or empty directories specified via the namespace
facility:
/gno
/gno-hfs (MUST be an HFS volume)
/gno.boot
Both /gno-hfs and /gno.boot may be no larger than 800k (ie: the
results will fit onto an 800k floppy)
- make sure the three volumes above are online. Since I use a
floppy for /gno-hfs, I keep forgetting that ...
- copy the entire contents of /dist to /gno
- run the /src/gno/build.tools/fudgeinstall script
- run the /src/gno/build.tools/mkboot script
- run the /src/gno/build.tools/mkdisk1 script
- go to the /gno directory. Using gshk, archive all the
directories you find there (such as gno.01, gno.02, etc).
You should create the files gno.01.shk, gno.02.shk, and so
forth.
*** Don't include the upper directory name in the archive. ***
When creating gno.16.shk, leave out the /install directory.
- go to the /gno-hfs partition. Archive up all contents of that
partition to create the gnohfs.shk archive. The gnohfs.shk
file should be placed with the gno.??.shk files from the
previous step.
*** Don't include the upper directory name in the archive. ***
- go to the /gno.boot partition and use gshk to archive all
all the files in that partition. Name the resulting archive
file gnoboot.shk, and place it with the other archive files.
*** Don't include the upper directory name in the archive. ***
- run the /src/gno/build.tools/mkdisk2 script

View File

@ -1,9 +1,10 @@
$Id: headers,v 1.1 1997/02/28 05:42:26 gdr Exp $
$Id: headers,v 1.2 1999/01/09 21:28:35 gdr-ftp Exp $
A hash prefix indicates that it has passed the compile test. An "[Orca]"
indicates that the file is modified from an Orca/C header rather than
from either BSD or custom sources.
This file is probably out of date; feel free to submit corrections.
# curses.h changed hash type from u_int to u_long
# db.h various macros have changed.
@ -17,7 +18,7 @@ from either BSD or custom sources.
# glob.h
# gno/conf.h
# gno/gno.h
gno/kerntool.h INCOMPLETE CHANGES -- OBSOLETE?
gno/kerntool.h INCOMPLETE CHANGES
# gno/kvm.h
# gno/proc.h
# gno/sim.h
@ -44,7 +45,7 @@ from either BSD or custom sources.
# sgtty.h
# signal.h
# stddef.h
# stdio.h [Orca] *** critical that __ORCAC_VERSION is correct
# stdio.h *** upgraded to BSD 4.4 (incompatible downward)
# stdlib.h
# string.h * check need for "const" in non-BSD, non-ORCA routines
# sys/cdefs.h

View File

@ -1,21 +0,0 @@
System calls new in v2.0.6
==========================
select $4303
InstallNetDriver $4403
socket $4503
bind $4603
connect $4703
listen $4703
accept $4903
recvfrom $4A03
sendto $4B03
recv $4C03
send $4D03
getpeername $4E03
getsockname $4F03
getsockopt $5003
setsockopt $5103
shutdown $5203
setreuid $5303
setregid $5403

View File

@ -1,17 +1,42 @@
This file lists the status of the various files in the GNO base distribution.
*************************************************************************
* *
*** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE ****
* *
* Please do not edit this file. This is the one file in the GNO *
* base distribution that I explicitly don't want anyone else to edit; *
* it reflects the status of the builds on the machine from which *
* current versions of GNO are distributed. If you have comments *
* to make on this file, please either send them to the developers' *
* mailing list or to me directly. Thank you. *
* *
* Devin Reade, 10 April 1998. *
* *
* $Id: status.bin,v 1.22 2012/08/26 02:54:58 gdr Exp $ *
* *
*************************************************************************
Version: $Id: status.bin,v 1.8 1997/12/22 01:20:42 gdr Exp $
This file lists the status of the various files in the GNO base distribution.
It really needs a wide screen to be viewed properly. I'm using 132 columns.
You will see text that's delimited by three percent characters ("%%%").
These are notations that are used for converting this file to an html
report. The report is generated automatically.
Person Working on Component ("Owner")
-------------------------------------
dave Dave Tribby
dt Derek Taubert
evan Evan Day
gdr Devin Reade
lb Leslie Barstow
matt Matt Ackeret
sonk Soenke Behrens
tl Tilghman Lesher
%%%NAMES-START%%%
dave Dave Tribby <tribby@cup.hp.com>
dt Derek Taubert <taubert@geeks.org>
evan Evan Day <day@ENGR.ORST.EDU>
gdr Devin Reade <gdr@trenco.gno.org>
lb Leslie Barstow <phoenix@faerealm.faerealm.com>
ma Marlin Allred <Marlin.Allred@unisys.com> (not on gno-devel)
matt Matt Ackeret <mattack@vax.area.com>
mober Scott Moberly <smoberly@s-cwis.unomaha.edu> (not on gno-devel)
sonk Soenke Behrens <sbehrens@bigfoot.com>
sr Steve Reeves <stever@gate.net>
tl Tilghman Lesher <lesherjt@vuse.vanderbilt.edu>
%%%NAMES-END%%%
Column Key
----------
@ -20,353 +45,379 @@ Program - Name of the program.
Req - Is it required for v2.0.6?
Owner - Who is responsible for it.
Source - Has the source been located/written? "dir" means it's
a directory. "gen" means that it's generated by the
installation scripts.
a directory.
Man - Is the documentation complete? This includes the man
page, describe entry, rVersion fork, and any
required auxillary documentation. The label
'P' means it's present, 'T' means it's been
tested (reviewed).
tested (reviewed). '[G]' indicates that it is
missing the GNO version of the man page (but
has the BSD version)
Compiled - Has it been cleanly recompiled with new headers/libs?
Tested - Has it been tested?
Archived - Has it been entered in the CVS repository? (gdr to coord)
Installed - Are 'release' and 'makeinstall' targets complete?
('R' and 'I', respectively)
Installed - Are 'release', 'install', and 'dist' targets complete?
('R', 'I', and 'D', respectively). The 'release' target
places all necessary files into the /dist (distribution)
hierarchy. The 'I' target installs onto a live file system.
The 'dist' target archives files from the /dist hierarchy
and places them in NuFX archives (no bigger than 780k)
suitable for distribution.
(Pkg) or Archive Install In
Program [Note] 204 Req Owner Source Man Compile Test Target Target Archive
---------------------------------------------------------------------------------------------------------------
*/system Y Y - dir - - - - - -
*/system/Desk.Accs Y Y - dir - - - - - -
*/system/Desk.Accs/gnosnooper Y Y dt /gno.disk2/system.shk
*/system/Desk.Accs/gsi Y Y /gno.disk2/system.shk
*/system/Desk.Accs/suspda Y Y /gno.disk2/system.shk
*/system/Drivers Y Y - dir - - - - - -
*/system/Drivers/fileport Y Y dt /gno.disk2/system.shk
*/system/Drivers/fileport.data Y Y dt /gno.disk2/system.shk
*/system/Drivers/nullport Y Y dt /gno.disk2/system.shk
*/system/System.Setup Y Y - dir - - - - - -
*/system/System.Setup/sim Y Y dt /gno.disk2/system.shk
/ Y gdr dir - - - - Y /gno.disk1/installbin
/HFSinclude Y gdr dir - - - - Y /gno.disk1/installbin
/bin Y Y gdr dir - - - - Y /gno.disk1/installbin
/bin/aroff Y Y
/bin/binprint Y
/bin/cat Y Y dave Y T Y Y Y R
/bin/center Y
Archive Install (Pkg) or
Program 204 Req Owner Source Man Compile Test Target Target [Note] Comments
--------------------------------------------------------------------------------------------------------------------------
%%%STATUS-TABLE-START%%%
*/system Y Y - dir - - - - -
*/system/Desk.Accs Y Y - dir - - - - -
*/system/Desk.Accs/gnosnooper Y Y dt
*/system/Desk.Accs/gsi Y # Superceded by TMTerm?
*/system/Desk.Accs/tmterm N Y dave
*/system/Desk.Accs/suspda Y Y dave Y . . . Y
*/system/Drivers Y Y - dir - - - - -
*/system/Drivers/fileport Y Y dt
*/system/Drivers/fileport.data Y Y dt
*/system/Drivers/nullport Y Y dt
*/system/System.Setup Y Y - dir - - - - -
*/system/System.Setup/gnobug Y Y gdr . . . . . .
*/system/System.Setup/sim Y Y dt
/ Y Y gdr dir - - - - -
/HFSinclude N Y gdr dir - - - - -
/bin Y Y gdr dir - - - - -
/bin/aroff Y Y gdr Y T Y Y Y RI
/bin/binprint Y Y dt Y T Y Y Y RI
/bin/cat Y Y dave Y T Y Y Y RI
/bin/center Y Y gdr Y T Y Y Y RI
/bin/chmod Y lb
/bin/chtyp Y Y evan Y T Y Y Y R
/bin/cmp Y Y evan Y T Y Y Y R
/bin/chtyp Y Y evan Y T Y Y Y RI
/bin/cmp Y Y evan Y T Y Y Y RI
/bin/compress Y Y evan
/bin/conv Y (should be replaced by /usr/bin/udl)
/bin/cp Y Y dt
/bin/conv Y # should be replaced by /usr/bin/udl
/bin/cp Y Y
/bin/csh
/bin/date Y Y tl
/bin/date Y Y mober Y # uploaded to mail distrib on trenco
/bin/dd
/bin/df Y evan Y T Y Y Y R
/bin/df N Y evan Y T Y Y Y RI
/bin/domainname
/bin/du Y Y evan
/bin/echo Y dt
/bin/ed
/bin/du Y Y evan Y
/bin/echo N Y dt
/bin/ed N . mober . . . . . . # avail separately (trenco)
/bin/edit Y Y . Y
/bin/egrep Y Y evan
/bin/expr
/bin/false Y gdr Y T Y Y Y R
/bin/false N Y gdr Y T Y Y Y RI
/bin/fgrep Y Y evan
/bin/freeze Y Y
/bin/grep Y Y evan
/bin/gsh Y Y Y
/bin/head Y Y dave Y T Y Y Y R
/bin/hostname Y dt
/bin/info Y lb (rename to something else)
/bin/kill Y
/bin/less Y Y
/bin/ln N
/bin/ls Y Y
/bin/make Y O
/bin/makemake Y O
/bin/mkdir Y Y dt
/bin/more Y Y matt
/bin/mv Y dt
/bin/passwd Y Y
/bin/pax N
/bin/ps Y (replace functionality of /usr/bin/eps)
/bin/purge Y Y
/bin/pwd Y dave Y T Y Y Y R
/bin/rcp Y dt
/bin/rm Y dt
/bin/rmail
/bin/rmdir Y gdr Y T Y Y Y R
/bin/sh Y gdr
/bin/shutdown Y
/bin/sleep Y Y dave Y T Y Y Y R
/bin/split Y Y dave Y T Y
/bin/strings Y Y lb
/bin/stty Y Y
/bin/gsh Y Y dave Y Y Y Y # still uses old termcap
/bin/head Y Y dave Y T Y Y Y RI
/bin/hostname N Y dt
/bin/info Y . lb # rename to something else
/bin/kill N Y dave Y T Y Y Y RI
/bin/less Y Y sr Y . . . Y
/bin/ln N N
/bin/ls Y Y . Y . . . Y
/bin/make Y Y . Y . . . Y
/bin/makemake Y Y . Y . . . Y
/bin/mkdir Y Y dt Y . . . Y
/bin/more Y Y matt Y
/bin/mv Y Y
/bin/passwd Y Y . Y . . . Y
/bin/pax N N
/bin/ps N Y . Y . . . Y # formerly eps
/bin/purge Y Y . Y . . . Y
/bin/pwd N Y dave Y T Y Y Y RI
/bin/rcp N Y dt Y T Y . Y RI
/bin/rm Y Y tribby Y T Y Y Y RI
/bin/rmail N N
/bin/rmdir N Y gdr Y T Y Y Y RI
/bin/sh N Y gdr
/bin/shutdown Y Y
/bin/sleep Y Y dave Y T Y Y Y RI
/bin/split Y Y dave Y T Y Y Y RI
/bin/strings Y Y lb Y
/bin/stty Y Y . Y . . . Y
/bin/su Y Y
/bin/sync Y
/bin/tail Y Y dave Y T Y Y Y R
/bin/tar Y Y tl
/bin/tee Y Y gdr Y T Y Y Y R
/bin/test Y gdr Y T Y Y Y R
/bin/time Y Y
/bin/touch Y Y dt
/bin/tr Y Y dave Y T Y Y Y R
/bin/true Y gdr Y T Y Y Y R
/bin/sync N Y
/bin/tail Y Y dave Y T Y Y Y RI
/bin/tar Y Y tl Y
/bin/tee Y Y gdr Y T Y Y Y RI
/bin/test N Y gdr Y T Y Y Y RI
/bin/time Y Y dave Y . . . Y
/bin/touch Y Y dt Y . . . Y
/bin/tr Y Y dave Y T Y Y Y RI
/bin/true N Y gdr Y T Y Y Y RI
/bin/uncompress Y Y
/bin/uname Y
/bin/uniq Y Y dave
/bin/upper Y
/bin/vi Y Y
/bin/wc Y Y dave Y T Y Y Y R
/bin/yes Y dave Y T Y Y Y R
/dev Y Y gdr dir - - - - Y /gno.disk1/installbin
/dev/modem Y Y dt Y /gno.disk2/dev.shk
/dev/null Y dt Y /gno.disk2/dev.shk
/dev/printer Y Y dt Y /gno.disk2/dev.shk
/doc Y gdr dir - - - - Y /gno.disk1/installbin
/etc Y Y gdr dir - - - - Y /gno.disk1/installbin
/etc/cronlog (cron)
/etc/crontab (cron)
/etc/freeze.cnf (freeze)
/etc/gettytab Y Y Y /gno.disk2/etc.shk
/etc/group Y Y gdr Y - /gno.disk2/etc.shk
/etc/inittab (initd) Y Y Y /gno.disk2/etc.shk
/etc/motd Y Y gdr Y - - /gno.disk2/etc.shk
/etc/namespace Y Y gdr gen Y /gno.disk1/installbin
/etc/passwd Y Y gdr Y - /gno.disk2/etc.shk
/etc/rchost (mu)
/etc/syslog.conf (syslog)
/bin/uname N Y sr Y T Y Y Y RI
/bin/uniq Y Y dave Y T Y Y Y RI
/bin/upper Y Y . Y . . . Y
/bin/vi Y Y . Y . . . Y
/bin/wc Y Y dave Y T Y Y Y RI
/bin/yes Y dave Y T Y Y Y RI
/dev Y Y gdr dir - - - -
/dev/modem Y Y dt
/dev/null N Y dt
/dev/printer Y Y dt
/doc N Y gdr dir - - - -
/etc Y Y gdr dir - - - -
/etc/cronlog . . sr . . . . . . (cron)
/etc/crontab . . sr . . . . . . (cron)
/etc/freeze.cnf . . . . . . . . . (freeze)
/etc/gettytab Y Y . Y
/etc/group Y Y gdr Y . -
/etc/inittab Y Y . Y . . . . . (initd)
/etc/motd Y Y gdr Y . - -
/etc/namespace Y Y gdr Y . . . . Y
/etc/passwd Y Y gdr Y . -
/etc/rchost . . . . . . . . . (mu)
/etc/syslog.conf . . . . . . . . . (syslog)
/etc/termcap Y Y evan
/etc/tmtermrc (tmterm)
/etc/tty.config Y Y gdr Y - /gno.disk2/etc.shk
/etc/ttys Y Y Y -
/etc/utmp (mu)
/etc/tmtermrc . . . . . . . . . (tmterm)
/etc/tty.config Y Y gdr Y . -
/etc/ttys Y Y Y . -
/etc/utmp . . . . . . . . . (mu)
/gshrc Y Y
/home/root Y gdr dir - - - -
/initrc (single-user) Y Y gdr Y - /gno.disk1/initrc
/installbin Y Y gdr - /gno.disk1/installbin
/home/root N Y gdr dir - - - -
/initrc Y Y gdr Y . - # single-user
/installbin Y Y gdr . . -
/kern Y Y dt
/lib Y Y gdr dir - - - - Y /gno.disk1/installbin
/lib/lbsd Y N -
/lib/lcrypt Y N (now in libc)
/lib/libc Y Y gdr Y
/lib/libgno Y N -
/lib/lsaneglue Y sonk Y T Y Y Y
/lib/lstring Y (replaced by libc?)
/lib Y Y gdr dir - - - - Y
/lib/lbsd Y N - - - - - - - [B]
/lib/lcrypt Y N - - - - - - - [B]
/lib/libc Y Y gdr Y . Y . Y
/lib/libgno Y N - - - - - - - [B]
/lib/lsaneglue N Y sonk Y T Y Y Y RI
/lib/lstring Y # replaced by libc?
/lib/orcalib Y Y gdr Y T Y Y Y
/lib/sysfloat Y gdr Y T Y Y Y
/libexec/atrun
/lib/sysfloat N Y gdr Y T Y Y Y
/libexec/atrun . . sr
/libexec/fingerd
/libexec/ftpd Y dt
/libexec/ftpd N Y dt
/libexec/rexecd
/libexec/rlogind
/libexec/rshd
/libexec/talkd Y dt
/libexec/talkd N Y dt
/libexec/telnetd
/libexec/uucpd
/sbin/dump Y dt
/sbin/dump N Y dt
/sbin/dumpfs
/sbin/fsck
/sbin/init (initd) Y Y
/sbin/initd (initd) Y Y
/sbin/init Y Y . . . . . . . (initd)
/sbin/initd Y Y . . . . . . . (initd)
/sbin/mkso N Y gdr Y T Y Y Y RI
/sbin/newfs
/sbin/ping
/sbin/renram5 Y gdr
/sbin/renram5 N Y gdr Y T Y Y Y RI
/startinst Y
/usr Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/bin Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/bin/DAY Y
/usr/bin/GOTHIC Y
/usr/bin/SSCII Y
/usr/bin/See Y
/usr/bin/apply N
/usr/bin/apropos (man) Y gdr Y
/usr/bin/ar N
/usr/bin/at
/usr/bin/aw30 Y
/usr/bin/awk Y
/usr/bin/bang Y
/usr/bin/banner Y
/usr/bin/basename Y gdr
/usr Y Y gdr dir - - - - Y
/usr/bin Y Y gdr dir - - - - Y
/usr/bin/alarm Y . . Y . . . Y
/usr/bin/apply N N
/usr/bin/apropos N Y gdr Y T Y Y Y RI (man)
/usr/bin/ar N N
/usr/bin/asml N Y gdr Y T Y Y Y RI (compile)
/usr/bin/assemble N Y gdr Y T Y Y Y RI (compile)
/usr/bin/at . . sr
/usr/bin/aw30 Y . . Y . . . Y
/usr/bin/awk N Y dave Y T T T Y RI
/usr/bin/bang N Y
/usr/bin/banner Y . . Y . . . Y
/usr/bin/basename N Y mober Y T Y Y Y RI
/usr/bin/biff
/usr/bin/bison Y N
/usr/bin/cal Y
/usr/bin/calendar
/usr/bin/catrez Y dave Y T Y Y Y R
/usr/bin/cclean Y
/usr/bin/cjpeg N (add on)
/usr/bin/cksum Y dave
/usr/bin/cmpl Y Y
/usr/bin/coff Y
/usr/bin/col
/usr/bin/column
/usr/bin/compile Y Y
/usr/bin/cal Y . . Y . . . Y
/usr/bin/catrez N Y dave Y T Y Y Y RI
/usr/bin/cclean N Y sonk
/usr/bin/cksum N Y dave Y Y Y Y Y RI
/usr/bin/cmpl Y Y gdr Y T Y Y Y RI (compile)
/usr/bin/coff N Y
/usr/bin/col N . mober . . . . . . # avail separately (trenco)
/usr/bin/colcrt N Y sr Y T Y Y Y RI
/usr/bin/column N . mober
/usr/bin/compile Y Y gdr Y T Y Y Y RI
/usr/bin/copycat Y Y tl
/usr/bin/cpp gdr Y Y
/usr/bin/ctags Y dt
/usr/bin/cut Y dave Y T Y Y Y R
/usr/bin/describe (describe) Y gdr Y T Y Y Y R
/usr/bin/cpp N Y gdr Y Y
/usr/bin/ctags N Y dt Y T Y Y Y RI
/usr/bin/cut N Y dave Y T Y Y Y RI
/usr/bin/day Y
/usr/bin/describe N Y gdr Y T Y Y Y RI (describe)
/usr/bin/dhrystone Y N
/usr/bin/diff Y gdr
/usr/bin/dirname Y gdr
/usr/bin/dmake Y gdr
/usr/bin/env Y gdr
/usr/bin/eps Y N (replace with updated /bin/ps)
/usr/bin/diff N Y gdr
/usr/bin/dirname N Y mober Y T Y Y Y RI
/usr/bin/dmake N Y gdr
/usr/bin/env N Y gdr
/usr/bin/ffdir Y
/usr/bin/file
/usr/bin/find gdr
/usr/bin/find N . gdr # sr working on GS-specific implementation
/usr/bin/finger
/usr/bin/flex Y N
/usr/bin/fmt Y gdr Y T Y Y Y R
/usr/bin/fold Y
/usr/bin/ftp Y dt
/usr/bin/fmt N Y gdr Y T Y Y Y RI
/usr/bin/fold Y . . Y . . . Y
/usr/bin/ftp N Y dt Y . Y . Y RI
/usr/bin/getopt
/usr/bin/getvers Y Y
/usr/bin/gunzip Y
/usr/bin/gzip Y
/usr/bin/getvers Y Y dave Y T Y Y Y RI
/usr/bin/gothic Y
/usr/bin/gunzip N Y
/usr/bin/gzip N Y
/usr/bin/hear Y
/usr/bin/help Y Y gdr Y T - Y Y R
/usr/bin/help Y Y gdr Y T - Y Y RI
/usr/bin/hexdump
/usr/bin/install Y gdr Y T Y Y Y R
/usr/bin/install N Y gdr Y T Y Y Y RI
/usr/bin/join
/usr/bin/last Y dt
/usr/bin/launch Y Y tl
/usr/bin/link (ie: ld) Y Y
/usr/bin/locate gdr
/usr/bin/logger Y
/usr/bin/last N Y dt Y T Y Y Y RI
/usr/bin/launch Y Y tl Y
/usr/bin/link (ie: ld) Y Y gdr Y T Y Y Y RI
/usr/bin/locate N . gdr
/usr/bin/logger N Y gdr Y T Y Y Y RI
/usr/bin/logname
/usr/bin/lpq (lpr) Y dt
/usr/bin/lpr (lpr) Y Y dt
/usr/bin/lprm (lpr) Y dt
/usr/bin/lseg Y Y dave Y T Y Y Y R
/usr/bin/lpq Y Y dt . . . . . . (lpr)
/usr/bin/lpr Y Y dt . . . . . . (lpr)
/usr/bin/lprm Y Y dt . . . . . . (lpr)
/usr/bin/lseg Y Y dave Y T Y Y Y RI
/usr/bin/mkdep
/usr/bin/makedmake gdr
/usr/bin/man Y Y gdr Y
/usr/bin/news Y N (waiting on NNTP/UUCP)
/usr/bin/makedmake N . gdr
/usr/bin/man Y Y gdr Y T Y Y Y RI
/usr/bin/news Y N # waiting on NNTP
/usr/bin/nm
/usr/bin/nosh (formerly zsh) Y lb
/usr/bin/nroff Y Y gdr Y T Y Y Y R
/usr/bin/patch Y gdr
/usr/bin/nosh N Y lb # formerly zsh
/usr/bin/nroff Y Y gdr Y T Y Y Y RI # using old termcap
/usr/bin/patch N Y gdr
/usr/bin/pman Y
/usr/bin/pr
/usr/bin/printenv Y gdr
/usr/bin/printenv N Y gdr
/usr/bin/printf
/usr/bin/qtime Y
/usr/bin/rb Y Y
/usr/bin/removerez N Y gdr Y T Y Y Y RI
/usr/bin/reset Y
/usr/bin/rlogin Y dt
/usr/bin/rot13 Y lb
/usr/bin/rsh Y dt
/usr/bin/rlogin N Y dt Y T Y . Y RI
/usr/bin/rot13 N Y lb
/usr/bin/rsh N Y dt Y T Y . Y RI
/usr/bin/rx Y Y
/usr/bin/rz Y Y
/usr/bin/sb Y
/usr/bin/script Y Y
/usr/bin/sed Y dave Y
/usr/bin/sendmail N (waiting on NNTP/UUCP)
/usr/bin/setvers Y Y
/usr/bin/script Y Y dave
/usr/bin/sed N Y dave Y Y Y Y Y RI
/usr/bin/see Y
/usr/bin/sendmail N N # waiting on SMTP
/usr/bin/setvers Y Y dave
/usr/bin/shar
/usr/bin/size
/usr/bin/sort Y gdr Y (supercedes msort/dsort)
/usr/bin/sum Y Y dave
/usr/bin/sort Y Y gdr Y # supercedes msort/dsort?
/usr/bin/sscii Y
/usr/bin/sum Y Y dave Y Y Y Y Y RI (cksum)
/usr/bin/sx Y Y
/usr/bin/sz Y Y
/usr/bin/talk Y dt
/usr/bin/telnet Y dt
/usr/bin/talk N Y dt
/usr/bin/telnet N Y dt
/usr/bin/tftp
/usr/bin/tset
/usr/bin/tsort Y
/usr/bin/tsort Y . . Y . . . Y
/usr/bin/tty
/usr/bin/unshar Y Y
/usr/bin/unzip Y
/usr/bin/uptime Y Y
/usr/bin/uudecode
/usr/bin/uuencode
/usr/bin/wall Y dt
/usr/bin/whatis (man) Y gdr Y
/usr/bin/whereis Y gdr Y T Y Y Y R
/usr/bin/wall N Y dt Y T Y Y Y RI
/usr/bin/whatis N Y gdr Y T Y Y Y RI (man)
/usr/bin/whereis N Y gdr Y T Y Y Y RI
/usr/bin/which
/usr/bin/who Y Y dt Y Y
/usr/bin/whois Y dt
/usr/bin/write Y lb
/usr/bin/who Y Y dt Y T Y Y Y RI
/usr/bin/whois N Y dt Y T Y . Y RI
/usr/bin/write N Y lb Y
/usr/bin/xargs
/usr/bin/yankit Y Y
/usr/bin/zsh Y lb (renamed to nosh)
/usr/games Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/bin/zsh N Y lb # renamed to nosh
/usr/games Y Y gdr dir - - - - Y
/usr/games/calendar N Y ma Y T Y Y Y RI
/usr/games/wump Y
/usr/include Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/lib Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/lib/libflex Y
/usr/include Y Y gdr dir - - - - Y
/usr/lib Y Y gdr dir - - - - Y
/usr/lib/libcontrib N Y gdr Y . Y Y Y RI
/usr/lib/libcurses Y Y evan
/usr/lib/libregexp Y Y
/usr/lib/libedit N Y gdr
/usr/lib/libflex Y
/usr/lib/libnetdb N Y dt Y Y Y RI
/usr/lib/libregexp Y N - - - - - - - [B]
/usr/lib/libtermcap Y Y evan
/usr/lib/libutil Y gdr Y
/usr/lib/tmac Y gdr dir - - - - Y /gno.disk1/installbin
/usr/lib/tmac/tmac.an (nroff) Y
/usr/lib/tmac/tmac.s (nroff) Y
/usr/orca/bin/occ Y sonk
/usr/orca/bin/rc Y sonk
/usr/orca/bin/udl Y sonk Y T Y Y Y R
/usr/man Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat1 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat2 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat3 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat4 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat5 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat6 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat7 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/cat8 Y Y gdr dir - - - - Y /gno.disk1/installbin
/usr/man/man1 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man1/intro.1 Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/man/man2 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man2/* [A] Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/man/man3 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man3/* [A] Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/man/man4 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man4/* [A] Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/man/man5 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man5/* [A] Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/man/man6 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man6/intro.6 Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/man/man7 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man7/* [A] Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/man/man8 Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/man/man8/intro.8 Y Y gdr - Y /gno.disk3/usr.man.shk
/usr/sbin Y Y gdr dir - - - - Y /gno.disk3/usr.man.shk
/usr/sbin/catman (man) Y gdr Y
/usr/sbin/cron Y Y
/usr/sbin/descc (describe) Y gdr Y T Y Y Y R
/usr/sbin/descu (describe) Y gdr Y T Y Y Y R
/usr/sbin/getty Y Y
/usr/sbin/inetd Y dt
/usr/sbin/login Y Y dt
/usr/sbin/lpc (lpr) Y dt
/usr/sbin/lpd (lpr) Y Y dt
/usr/sbin/lptest (lpr) Y dt
/usr/sbin/makewhatis (man) Y gdr Y
/usr/lib/libutil N Y gdr Y . Y . Y RI
/usr/lib/liby N Y gdr Y . Y . Y RI
/usr/lib/tmac Y Y gdr dir - - - - Y
/usr/lib/tmac/tmac.an Y . . . . . . . . (nroff)
/usr/lib/tmac/tmac.s Y . . . . . . . . (nroff)
/usr/orca/bin/occ N Y sonk
/usr/orca/bin/rc N Y sonk
/usr/orca/bin/udl N Y sonk Y T Y Y Y RI
/usr/man Y Y gdr dir - - - - Y
/usr/man/cat1 Y Y gdr dir - - - - Y
/usr/man/cat2 Y Y gdr dir - - - - Y
/usr/man/cat3 Y Y gdr dir - - - - Y
/usr/man/cat4 Y Y gdr dir - - - - Y
/usr/man/cat5 Y Y gdr dir - - - - Y
/usr/man/cat6 Y Y gdr dir - - - - Y
/usr/man/cat7 Y Y gdr dir - - - - Y
/usr/man/cat8 Y Y gdr dir - - - - Y
/usr/man/man1 Y Y gdr dir - - - - Y
/usr/man/man1/intro.1 Y Y gdr . . - . . Y
/usr/man/man2 Y Y gdr dir - - - - Y
/usr/man/man2/* Y Y gdr . . - . . Y [A]
/usr/man/man3 Y Y gdr dir - - - - Y
/usr/man/man3/* Y Y gdr . . - . . Y [A]
/usr/man/man4 Y Y gdr dir - - - - Y
/usr/man/man4/* Y Y gdr . . - . . Y [A]
/usr/man/man5 Y Y gdr dir - - - - Y
/usr/man/man5/* Y Y gdr . . - . . Y [A]
/usr/man/man6 Y Y gdr dir - - - - Y
/usr/man/man6/intro.6 Y Y gdr . . - . . Y
/usr/man/man7 Y Y gdr dir - - - - Y
/usr/man/man7/* Y Y gdr . . - . . Y [A]
/usr/man/man8 Y Y gdr dir - - - - Y
/usr/man/man8/intro.8 Y Y gdr . . - . . Y
/usr/sbin Y Y gdr dir - - - - Y
/usr/sbin/catman N Y gdr Y T Y Y Y RI (man)
/usr/sbin/cron Y Y sr Y . . . Y
/usr/sbin/descc N Y gdr Y T Y Y Y RI (describe)
/usr/sbin/descu N Y gdr Y T Y Y Y RI (describe)
/usr/sbin/getty Y Y gdr Y T Y Y Y RI
/usr/sbin/inetd N Y dt Y [G]
/usr/sbin/login Y Y dt Y T Y Y Y RI
/usr/sbin/lpc Y Y dt . . . . . . (lpr)
/usr/sbin/lpd Y Y dt . . . . . . (lpr)
/usr/sbin/lptest N Y dt . . . . . . (lpr)
/usr/sbin/makewhatis N Y gdr Y T Y Y Y RI (man)
/usr/sbin/mctrl Y
/usr/sbin/mktmp
/usr/sbin/newuser (maybe replace with adduser?) (update to use /home vice /user, or maybe a conf file)
/usr/sbin/newuserv (maybe replace with adduser?) (update to use /home vice /user, or maybe a conf file)
/usr/sbin/nogetty Y
/usr/sbin/newuser N Y gdr Y T Y Y Y .
/usr/sbin/newuserv N Y gdr Y T Y Y Y . (newuser)
/usr/sbin/nogetty Y Y . Y . . . Y
/usr/sbin/runover Y Y
/usr/sbin/syslogd Y Y gdr Y . Y . Y . # still alpha; needs work
/usr/sbin/uptimed Y
/usr/spool Y N - dir - - - - - /gno.disk1/installbin
/var/adm Y gdr dir - - - - Y /gno.disk1/installbin
/var/adm/utmp (initd)
/var/adm/wtmp (initd)
/var/run dir - - - -
/var/spool Y gdr dir - - - - Y /gno.disk1/installbin
/var/spool/uucppublic Y gdr dir - - - -
/usr/spool Y N - dir - - - - -
/var/adm Y Y gdr dir - - - - Y
/var/adm/utmp Y Y . . . . . . . (initd)
/var/adm/wtmp Y Y . . . . . . . (initd)
/var/run N Y . dir - - - -
/var/spool Y Y gdr dir - - - - Y
/var/spool/uucppublic N Y gdr dir - - - -
%%%STATUS-TABLE-END%%%
NOTES:
A) See the status.man for a complete list of
these files.
A)
%%%NOTE-START-A%%%
See the status.man for a complete list of these files.
%%%NOTE-END-A%%%
B)
%%%NOTE-START-B%%%
The functions from these libraries now appear in libc.
%%%NOTE-END-B%%%
The following are add-on utils, that are not part of the base GNO
distribution:
/usr/local/bin/cjpeg
/usr/local/bin/djpeg
/usr/local/bin/drwm
/usr/local/bin/jive

View File

@ -1,4 +1,4 @@
$Id: status.lib,v 1.6 1997/12/02 05:28:37 gdr Exp $
$Id: status.lib,v 1.9 2012/08/26 02:54:58 gdr Exp $
Key for Code Status column:
R == reviewed
@ -76,8 +76,12 @@ rexit libc/sys/syscall.c C 3 stdlib.h
setdebug libc/sys/trap.asm T 2 gno/gno.h
setsystemvector libc/sys/trap.asm C 2U gno/gno.h
settpgrp libc/sys/trap.asm C 2 gno/gno.h
sprintmt libc/gno/sprintmt.c T 3 gno/gno.h
syslogmt libc/gen/syslog.c T 3 sys/syslog.h
tcnewpgrp libc/sys/trap.asm C 2 gno/gno.h
tctpgrp libc/sys/trap.asm C 2 gno/gno.h
vsprintmt libc/gno/sprintmt.c T 3 gno/gno.h
vsyslogmt libc/gen/syslog.c T 3 sys/syslog.h
~GNO_COMMAND libc/gno/gnocmd.asm C 3 na
~GNO_FREEARG libc/gno/parsearg.asm C 3 na
~GNO_PARSEARG libc/gno/parsearg.asm C 3 na
@ -113,7 +117,7 @@ chmod libc/sys/syscall.c C 2 sys/stat.h
clearerr libc/stdio/clrerr.c C 3 stdio.h
close libc/sys/syscall.c C 2 unistd.h
closedir libc/gen/dirent.c T 3 dirent.h
closelog libc/gen/syslog.asm C 3 sys/syslog.h
closelog libc/gen/syslog.c C 3 sys/syslog.h
connect libc/sys/trap.asm C 2 sys/socket.h
creat libc/sys/syscall.c T 2 sys/fcntl.h
crypt libc/gen/crypt.c C 3 unistd.h
@ -235,7 +239,7 @@ mkstemp libc/stdio/mktemp.c C 3 unistd.h
mktemp libc/stdio/mktemp.c C 3 unistd.h
open libc/sys/syscall.c C 2 sys/fcntl.h
opendir libc/gen/dirent.c T 3 dirent.h
openlog libc/gen/syslog.asm C 3 sys/syslog.h
openlog libc/gen/syslog.c C 3 sys/syslog.h
openpty [A] libutil/pty.c libutil.h
optarg [var] libc/stdlib/getopt.c C 3 stdlib.h
opterr [var] libc/stdlib/getopt.c C 3 stdlib.h
@ -269,6 +273,7 @@ putw libc/stdio/putw.c C 3 stdio.h
raise libc/sys/syscall.c C 3 signal.h
read libc/sys/syscall.c C 2 unistd.h
readdir libc/gen/dirent.c T 3 dirent.h
readv libc/sys/syscall.c C 2 sys/uio.h
recv libc/sys/trap.asm C 2 sys/socket.h
recvfrom libc/sys/trap.asm C 2 sys/socket.h
recvmsg ( missing from kernel ) 2 sys/socket.h
@ -306,7 +311,7 @@ setkey libc/gen/crypt.c C 3 unistd.h
setlinebuf libc/stdio/setbuffer.c C 3 stdio.h
setlocale (locale.h)
setlogin libc/gen/getlogin.c T 2 unistd.h
setlogmask libc/gen/syslog.asm C 3 sys/syslog.h
setlogmask libc/gen/syslog.c C 3 sys/syslog.h
setpassent libc/gen/getpwent.c 3 pwd.h
setpgid libc/sys/trap.asm C 2 unistd.h
setpgrp libc/sys/trap.asm C 2 unistd.h
@ -347,12 +352,13 @@ strncasecmp libc/str/case.c C 3 string.h
strsep libc/string/str.c C 3 string.h
stty libc/gen/compat.c C 3 sgtty.h
suboptarg [var] libc/stdlib/getsubopt.c C 3 stdlib.h
swab libc/string/swab.c C 3 string.h
swait libc/sys/trap.asm T 2 gno/gno.h
sys_errlist [var] libc/stdio/perror.c T 3 stdio.h
sys_nerr [var] libc/stdio/perror.c T 3 stdio.h
sys_siglist [var] libc/gen/siglist.c R 3 signal.h
sys_signame [var] libc/gen/siglist.c R 3 signal.h
syslog libc/gen/syslog.asm C 3 sys/syslog.h
syslog libc/gen/syslog.c C 3 sys/syslog.h
telldir libc/gen/dirent.c T 3 dirent.h
tempnam libc/stdio/tempnam.c C 3 stdio.h
times libc/sys/trap.asm C 2 sys/times.h
@ -365,6 +371,7 @@ umask libc/sys/syscall.c C 2 sys/stat.h
ungetc libc/stdio/ungetc.c C 3 stdio.h
unlink libc/sys/syscall.c T 2 unistd.h
unsetenv libc/gen/environ.c T 3 stdlib.h
unvis libc/gen/unvis.c C 3 vis.h
user_from_uid libc/gen/pwcache.c C 3 na
utime libc/gen/utime.c T 3 sys/time.h
utimes libc/gen/utime.c T 2 utime.h
@ -373,12 +380,13 @@ verrx libc/gen/err.c T 3 err.h
vfork libc/sys/trap.asm C 2 unistd.h
vfprintf libc/stdio/vfprintf.c C 3 stdio.h
vfscanf libc/stdio/vfscanf.c C 3 stdio.h
vis libc/gen/vis.c C 3 vis.h
vprintf libc/stdio/vprintf.c C 3 stdio.h
vscanf libc/stdio/fscanf.c C 3 stdio.h
vsnprintf libc/stdio/vsnprintf.c C 3 stdio.h
vsprintf libc/stdio/vsprintf.c C 3 stdio.h
vsscanf libc/stdio/vsscanf.c C 3 stdio.h
vsyslog libc/gen/syslog.asm C 3 sys/syslog.h
vsyslog libc/gen/syslog.c C 3 sys/syslog.h
vwarn libc/gen/err.c T 3 err.h
vwarnx libc/gen/err.c T 3 err.h
wait libc/sys/trap.asm C 2 sys/wait.h
@ -388,10 +396,11 @@ waitpid libc/sys/syscall.c C 2 sys/wait.h
warn libc/gen/err.c T 3 err.h
warnx libc/gen/err.c T 3 err.h
write libc/sys/syscall.c C 2 unistd.h
writev libc/sys/syscall.c T 2 sys/uio.h
zopen libc/stdio/ stdio.h
Notes:
[var] symbol is a variable, not a fuction
[var] symbol is a variable, not a function
[A] function needs to be modified before use
[B] these sets of routines rely on a modified utmp/wtmp file
structure. Therefore a large list of routines and programs
@ -433,9 +442,11 @@ BANK MODEL COMPLETE
na na N N libc/gen/setjmp.asm
78 0 0 Y N libc/gen/siglist.c
78 0 0 Y Y libc/gen/sleep.c
na na Y N libc/gen/syslog.asm
78 0 0 Y N libc/gen/syslog.c
na na Y N libc/gen/syslog2.asm [superceded by syslog.c]
78 0 0 Y N libc/gen/tty.c
78 0 0 Y Y libc/gen/utime.c
-1 0 0 Y N libc/gen/vis.c
na na N N libc/gno/gnocmd.asm
78 0 0 (1) Y Y libc/gno/gnomisc.c
@ -443,6 +454,8 @@ BANK MODEL COMPLETE
78 0 0 (1) Y N libc/gno/map.c
na na N N libc/gno/parsearg.asm
na na Y Y libc/gno/stack.asm
78 0 0 Y Y libc/gno/stack2.c
78 0 1 Y libc/gno/vsprintmt.c
78 0 0 Y N libc/locale/table.c [stub]
@ -526,6 +539,7 @@ BANK MODEL COMPLETE
78 0 0 Y N libc/string/case.c
78 0 0 Y N libc/string/str.c
78 0 0 Y Y libc/string/strerror.c
78 0 0 Y N libc/string/swab.c
78 0 0 Y libc/sys/exec.c
78 0 0 Y libc/sys/syscall.c

194
NOTES/status.usrman Normal file
View File

@ -0,0 +1,194 @@
#
# $Id: status.usrman,v 1.1 1999/01/09 21:28:35 gdr-ftp Exp $
#
# This file shows a listing of all the man pages in /src/gno/usr.man
# and what their status is. The formatting should be checked on both
# a linux machine (that being what creates the online version of the
# documentation, and under GNO on the GS using nroff.
#
# In each of the fields, the following characters have the following
# meanings:
# 'y' means that the condition has been checked and found to
# be satisfactory.
# 'n' means that something is known to be wrong with meeting
# the condition, and it has not yet been fixed. There
# shouldn't be many if any of these; problems should be
# fixed as they are located.
# '.' is a space holder to ease in the translation of this file
# to HTML format, and indicates a condition that has not yet
# been checked.
# '-' in the mkso column indicates that no mkso entries are
# needed for this particular man page (ie: that the column
# is irrelevent).
#
# Verifying the man page can be done on both machines using the following
# command:
# nroff -man filename | more
#
# This file can be checked for consistency with the update.usrman script
# in the /src/gno/NOTES directory.
#
# Devin Reade, April 1998.
#
### Do not remove this line. ###
#
# formatting formatting mkso entries
# man page checked (linux) checked (IIgs) exist
# ----------------------------------------------------------------
man1/intro.1 . y -
man2/accept.2 . y -
man2/access.2 . y -
man2/alarm.2 . y y
man2/bind.2 . y -
man2/chdir.2 . y y
man2/chmod.2 . y y
man2/close.2 . y -
man2/connect.2 . y -
man2/creat.2 . y -
man2/dup.2 . y y
man2/execve.2 . y y
man2/fcntl.2 . . .
man2/fork.2 . y y
man2/fsync.2 . y -
man2/getdtablesize.2 . y -
man2/getgid.2 . y y
man2/getlogin.2 . . .
man2/getpeername.2 . y -
man2/getpgrp.2 . y y
man2/getpid.2 . y y
man2/getsockname.2 . . .
man2/getsockopt.2 . . .
man2/gettimeofday.2 . . .
man2/getuid.2 . . .
man2/intro.2 . . -
man2/ioctl.2 . . .
man2/jobcontrol.2 . . .
man2/kernStatus.2 . . .
man2/kill.2 . . .
man2/listen.2 . . .
man2/lseek.2 . . .
man2/mkdir.2 . . .
man2/open.2 . . .
man2/pipe.2 . . .
man2/ports.2 . . .
man2/procsend.2 . . .
man2/read.2 . . .
man2/recv.2 . . .
man2/rename.2 . . .
man2/rmdir.2 . . .
man2/select.2 . . .
man2/semaphore.2 . . .
man2/send.2 . . .
man2/setdebug.2 . . .
man2/setpgid.2 . . .
man2/setregid.2 . . .
man2/setreuid.2 . . .
man2/setruid.2 . . .
man2/setuid.2 . . .
man2/shutdown.2 . . .
man2/sigblock.2 . . .
man2/signal.2 . . .
man2/sigpause.2 . . .
man2/sigsetmask.2 . . .
man2/socket.2 . . .
man2/stat.2 . . .
man2/statfs.2 . . .
man2/times.2 . . .
man2/truncate.2 . . .
man2/umask.2 . . .
man2/undocumented.2 . . .
man2/unlink.2 . . .
man2/utimes.2 . . .
man2/wait.2 . . .
man2/write.2 . . .
man3/GSString.3 . . .
man3/basename.3 . . .
man3/bcopy.3 . . .
man3/buildCmd.3 . . .
man3/buildEnv.3 . . .
man3/buildPath.3 . . .
man3/bzero.3 . . .
man3/clearerr.3 . . .
man3/crypt.3 . . .
man3/directory.3 . . .
man3/ecvt.3 . . .
man3/err.3 . . .
man3/exec.3 . . .
man3/execl.3 . . .
man3/exit.3 . . .
man3/fclose.3 . . .
man3/fflush.3 . . .
man3/fgetln.3 . . .
man3/fgets.3 . . .
man3/fnmatch.3 . . .
man3/fopen.3 . y .
man3/fputs.3 . . .
man3/fread.3 . . .
man3/fseek.3 . . .
man3/fsettext.3 . . .
man3/fts.3 . . .
man3/funopen.3 . . .
man3/getc.3 . . .
man3/getcwd.3 . . .
man3/getenv.3 . . .
man3/getgrent.3 . . .
man3/gethostname.3 . . .
man3/getopt.3 . . .
man3/getpass.3 . . .
man3/getpwent.3 . . .
man3/getsubopt.3 . . .
man3/getttyent.3 . . .
man3/index.3 . . .
man3/intro.3 . . -
man3/isRootPath.3 . . .
man3/isblank.3 . . .
man3/isinf.3 . . .
man3/mapErr.3 . . .
man3/mapMode.3 . . .
man3/mapPath.3 . . .
man3/mktemp.3 . . .
man3/needsgno.3 . . .
man3/parsearg.3 . . .
man3/pause.3 . . .
man3/popen.3 . . .
man3/printf.3 . . .
man3/progname.3 . . .
man3/psignal.3 . . .
man3/putc.3 . . .
man3/pwcache.3 . . .
man3/queue.3 . . .
man3/raise.3 . . .
man3/regex.3 . . .
man3/remove.3 . . .
man3/scandir.3 . . .
man3/scanf.3 . . .
man3/setbuf.3 . . .
man3/setjmp.3 . . .
man3/sleep.3 . . .
man3/sprintmt.3 . . .
man3/stack.3 . . .
man3/stdio.3 . . .
man3/strcasecmp.3 . . .
man3/strdup.3 . . .
man3/strerror.3 . . .
man3/strsep.3 . . .
man3/stty.3 . . .
man3/syslog.3 . . .
man3/tmpnam.3 . . .
man3/ttyname.3 . . .
man3/uname.3 . . .
man3/ungetc.3 . . .
man3/unvis.3 . . .
man3/utime.3 . . .
man3/vis.3 . . .
man4/intro.4 . . -
man4/tty.4 . . .
man5/intro.5 . . -
man5/utmp.5 . . .
man6/intro.6 . . -
man7/environ.7 . . .
man7/intro.7 . . -
man7/re.format.7 . . .
man8/init.8 . . .
man8/intro.8 . . -
man8/syslogd.8 . . .

72
NOTES/update.usrman Executable file
View File

@ -0,0 +1,72 @@
#! /usr/bin/perl
#
# This script is used to verify that the status.usrman file is current,
# at least with respect to which manpages are checked into the src/gno/usr.man
# directory hierarchy.
#
# Usage: update.usrman < status.usrman > output
#
# In other words, it doesn't update the status.usrman file directly; the
# output file would then have to be copied back to the original name, assuming
# that it is satisfactory.
#
# Read the input file for existing entries. Don't modify these.
#
while (<>) {
chomp;
if (m,^(man\S+)(.*),) {
$entries{$1} = $2;
} else {
$header .= $_ . "\n";
}
}
#
# Now get the list of checked in files. We do this by parsing the CVS/Entries
# files directly.
#
@chapters = ( '1', '2', '3', '4', '5', '6', '7', '8' );
foreach $c (@chapters) {
$file = "../usr.man/man$c/CVS/Entries";
open(fp, "< $file") || die("couldn't open $file: $!");
while (<fp>) {
if (m,^/([^/]+\.$c)/,) {
$page = "man$c/$1";
$cvs{$page} = '';
}
}
close(fp);
}
#
# Do some conchecks
#
@keylist_old = sort(keys(%entries));
for $k (@keylist_old) {
defined($cvs{$k}) ||
printf(stderr "Warning: page in input file but not checked in: %s\n",
$k);
}
#
# Do some updates
#
@keylist_new = sort(keys(%cvs));
for $k (@keylist_new) {
defined($entries{$k}) || ($entries{$k} = "\t\t.\t\t.\t\t.");
}
#
# Now print out the result.
#
print $header;
@keylist = sort(keys(%entries));
foreach $k (@keylist) {
if ($entries{$k} =~ m,^\s*$,) {
$entries{$k} = "\t\t.\t\t.\t\t.";
}
printf("%s%s\n", $k, $entries{$k});
}

349
ainclude/m16.gno Executable file
View File

@ -0,0 +1,349 @@
*************************************************************************
*
* GNO/ME system call macros for Orca/M.
* Copyright (C) 1991-1998 by Procyon, Inc.
*
* $Id: m16.gno,v 1.1 1998/03/08 17:18:11 gdr-ftp Exp $
*
*************************************************************************
;
; assembly mutual exclusion macros
;
MACRO
&lab lock &a1
&lab lda #1
tsb &a1
beq *+6
cop $7F
bra *-7
MEND
MACRO
&lab unlock &a1
&lab stz &a1
MEND
MACRO
&lab key
&lab dc i2'0'
MEND
;
; GNO system calls
;
MACRO
&lab kernVersion &a1
&lab pha
ldx #$403
jsl $E10008
pl2 &a1
MEND
MACRO
&lab kernStatus &a1
&lab pha
ldx #$603
jsl $E10008
pl2 &a1
MEND
MACRO
&lab kill &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl kill
case off
MEND
MACRO
&lab fork &a1
&lab ph4 &a1
case on
jsl fork
case off
MEND
MACRO
&lab exec &a1
&lab ph4 &a1(2)
ph4 &a1(1)
case on
jsl exec
case off
MEND
MACRO
&lab swait &a1
&lab ph2 &a1
case on
jsl swait
case off
MEND
MACRO
&lab ssignal &a1
&lab ph2 &a1
case on
jsl ssignal
case off
MEND
MACRO
&lab screate &a1
&lab ph2 &a1
case on
jsl screate
case off
MEND
MACRO
&lab sdelete &a1
&lab ph2 &a1
case on
jsl sdelete
case off
MEND
MACRO
&lab signal &a1
&lab ph4 &a1(2)
ph2 &a1(1)
case on
jsl signal
case off
MEND
MACRO
&lab wait &a1
&lab ph4 &a1
case on
jsl wait
case off
MEND
MACRO
&lab tcnewpgrp &a1
&lab ph2 &a1
case on
jsl tcnewpgrp
case off
MEND
MACRO
&lab settpgrp &a1
&lab ph2 &a1
case on
jsl settpgrp
case off
MEND
MACRO
&lab tctpgrp &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl tctpgrp
case off
MEND
MACRO
&lab sigsetmask &a1
&lab ph4 &a1
case on
jsl sigsetmask
case off
MEND
MACRO
&lab sigblock &a1
&lab ph4 &a1
case on
jsl sigblock
case off
MEND
MACRO
&lab execve &a1
&lab ph4 &a1(2)
ph4 &a1(1)
case on
jsl execve
case off
MEND
MACRO
&lab alarm &a1
&lab ph4 &a1
case on
jsl alarm
case off
MEND
MACRO
&lab setdebug &a1
&lab ph2 &a1
case on
jsl setdebug
case off
MEND
MACRO
&lab setsystemvector &a1
&lab ph4 &a1
case on
jsl setsystemvector
case off
MEND
MACRO
&lab sigpause &a1
&lab ph4 &a1
case on
jsl sigpause
case off
MEND
MACRO
&lab getpid
&lab case on
jsl getpid
case off
MEND
MACRO
&lab kvm_open
&lab case on
jsl kvm_open
case off
MEND
MACRO
&lab kvm_close &a1
&lab ph4 &a1
case on
jsl kvm_close
case off
MEND
MACRO
&lab kvmgetproc &a1
&lab ph2 &a1(2)
ph4 &a1(1)
case on
jsl kvmgetproc
case off
MEND
MACRO
&lab kvmnextproc &a1
&lab ph4 &a1
case on
jsl kvmnextproc
case off
MEND
MACRO
&lab kvmsetproc &a1
&lab ph4 &a1
case on
jsl kvmsetproc
case off
MEND
MACRO
&lab getpgrp &a1
&lab ph2 &a1
case on
jsl getpgrp
case off
MEND
MACRO
&lab pipe &a1
&lab ph4 &a1
case on
jsl pipe
case off
MEND
MACRO
&lab dup2 &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl dup2
case off
MEND
MACRO
&lab ioctl &a1
&lab ph4 &a1(3)
ph4 &a1(2)
ph2 &a1(1)
case on
jsl ioctl
case off
MEND
MACRO
&lab tgetent &a1
&lab ph4 &a1(2)
ph4 &a1(1)
case on
jsl tgetent
case off
MEND
MACRO
&lab tgetstr &a1
&lab ph4 &a1(2)
ph4 &a1(1)
case on
jsl tgetstr
case off
MEND
MACRO
&lab tgetnum &a1
&lab ph4 &a1
case on
jsl tgetnum
case off
MEND
MACRO
&lab tgetflag &a1
&lab ph4 &a1
case on
jsl tgetflag
case off
MEND
MACRO
&lab tgoto &a1
&lab ph2 &a1(3)
ph2 &a1(2)
ph4 &a1(1)
case on
jsl tgoto
case off
MEND
MACRO
&lab tputs &a1
&lab ph4 &a1(3)
ph2 &a1(2)
ph4 &a1(1)
case on
jsl tputs
case off
MEND
MACRO
&lab getuid
&lab case on
jsl getuid
case off
MEND

11
bin/aroff/Makefile Normal file
View File

@ -0,0 +1,11 @@
#
# $Id: Makefile,v 1.2 1999/01/15 08:36:31 gdr-ftp Exp $
#
PROG = aroff
SRCS = aroff.c print.c
.INCLUDE : /src/gno/prog.mk
aroff.o:: aroff.h
print.o:: aroff.h

31
bin/aroff/aroff.1 Normal file
View File

@ -0,0 +1,31 @@
.\"
.\" $Id: aroff.1,v 1.1 1999/01/15 08:36:31 gdr-ftp Exp $
.\"
.TH AROFF 1 "15 January 1998" GNO "Commands and Applications"
.SH NAME
.BR aroff
\- print Appleworks GS formatted manual pages
.SH SYNOPSIS
.BR aroff
.RI [ -b ]
.IR filename " ..."
.SH DESCRIPTION
.BR aroff
is used to print out documents that are in Appleworks GS word processor
format. It is intended primarily for manual pages that have been so
formatted.
.LP
Early versions of GNO used
.BR aroff
formatted manual pages. The use of this format has been superceded by
.BR nroff (1);
.BR aroff
should be avoided in new documentation.
.SH OPTIONS
.IP \fB-b\fR
Do not use boldface text.
.SH HISTORY
.BR aroff
appeared in GNO v1.0.
.SH SEE ALSO
.BR nroff (1).

180
bin/aroff/aroff.c Normal file
View File

@ -0,0 +1,180 @@
/*
awgs.c
Main loop driver code and awgs wordproc file read routines
$Id: aroff.c,v 1.4 1999/01/15 15:46:08 gdr-ftp Exp $
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include <gsos.h>
#include <shell.h>
#include <orca.h>
#include <gno/gno.h>
#include "aroff.h"
int noboldflag = 0;
saveArray *docSaveArray;
Ruler *docRulers;
textBlock **docTextBlocks; /* an array of textBlockPtrs */
word docSACount, numRulers, numBlocks;
void fileError(char *s)
{
int err;
int cl[2];
if (err = toolerror()) {
fprintf(stderr,"%s\n",s);
ERROR(&err);
cl[0] = 1;
cl[1] = 0;
CloseGS(cl);
exit(1);
}
}
void readAWGS(char *file)
{
int ref,err,z; /* refnum, err temp, and loop variable */
long recBlockSize; /* size of the upcoming text block */
int cl[2]; /* pBlock for GS/OS CloseGS call */
static GSString255 f; /* converted cstring(file) -> GSString */
static OpenRecGS o; /* pBlock for GS/OS Open call */
static SetPositionRecGS p;
static IORecGS i;
f.length = strlen(file);
strcpy(f.text,file);
o.pCount = 7;
o.pathname = &f;
o.requestAccess = readEnable;
o.resourceNumber = 0;
OpenGS(&o);
if (err = toolerror()) {
fprintf(stderr,"aroff: could not open AWGS file %s\n",file);
ERROR(&err);
exit(1);
}
ref = o.refNum;
if ((o.fileType != 0x50) || (o.auxType != 0x8010l)) {
cl[0] = 1;
cl[1] = ref;
CloseGS(cl);
fprintf(stderr,"aroff: file (%s) is not an AWGS file\n",file);
exit(1);
}
p.pCount = 3;
p.refNum = ref;
p.base = startPlus;
p.displacement = 668l;
SetMarkGS(&p);
fileError("SetMarkGS");
i.pCount = 4;
i.refNum = ref;
i.dataBuffer = (void *) &docSACount;
i.requestCount = 2l;
ReadGS(&i);
fileError("ReadGS (docSACount)");
#ifdef DEBUG
fprintf(stderr,"Number of SaveArray entries: %d\n",docSACount);
#endif
docSaveArray = calloc((size_t) docSACount, sizeof(saveArray));
i.dataBuffer = (void *) docSaveArray;
i.requestCount = sizeof(saveArray) * docSACount;
ReadGS(&i);
fileError("ReadGS (docSaveArray)");
#ifdef DEBUG
fprintf(stderr," saNum textBlock rulerNum\n");
fprintf(stderr," ----- --------- --------\n");
for (z = 0; z < docSACount; z++) {
fprintf(stderr," [%3d] %5d %5d\n",
z+1, docSaveArray[z].textBlock,docSaveArray[z].rulerNum);
}
#endif
numRulers = numBlocks = 0;
for (z = 0; z < docSACount; z++) {
if (docSaveArray[z].rulerNum+1 > numRulers) {
numRulers = docSaveArray[z].rulerNum+1;
}
if (docSaveArray[z].textBlock+1 > numBlocks) {
numBlocks = docSaveArray[z].textBlock+1;
}
}
#ifdef DEBUG
fprintf(stderr,"Number of Rulers: %d\n",numRulers);
fprintf(stderr,"Number of Blocks: %d\n",numBlocks);
#endif
docRulers = calloc((size_t) numRulers, sizeof(Ruler));
i.dataBuffer = (void *) docRulers;
i.requestCount = sizeof(Ruler) * numRulers;
ReadGS(&i);
fileError("ReadGS (docRulers)");
docTextBlocks = calloc((size_t) numBlocks, sizeof(textBlockPtr));
for (z = 0; z < numBlocks; z++) {
i.requestCount = 4l;
i.dataBuffer = (void *) &recBlockSize;
ReadGS(&i);
fileError("ReadGS (recBlockSize)");
#ifdef DEBUG
fprintf(stderr,"block %d size %8ld : ",z,recBlockSize);
#endif
docTextBlocks[z] = malloc(recBlockSize);
i.requestCount = recBlockSize;
i.dataBuffer = (void *) docTextBlocks[z];
ReadGS(&i);
fileError("ReadGS (textBlock)");
}
cl[0] = 1;
cl[1] = ref;
CloseGS(cl);
}
void usage(void)
{
fprintf(stderr,"aroff [-b] file1 [file ...]\n"
"-b don't do any boldfacing (useful for GNO Ref. Manuals)\n");
exit(1);
}
int main(int argc, char *argv[])
{
int i,z;
extern void printAWGS(void);
__REPORT_STACK(); /* show stack usage on exit if __CHECK_STACK__ defined */
if (argc == 1) {
usage();
}
for (i = 1; i < argc; i++) {
if (*argv[i] == '-') {
if (argv[i][1] == 'b') {
noboldflag = 1;
continue;
} else {
usage();
}
}
readAWGS(argv[i]);
printAWGS();
free(docSaveArray);
free(docRulers);
for (z = 0; z < numBlocks; z++) {
free(docTextBlocks[z]);
}
free(docTextBlocks);
}
}

12
bin/aroff/aroff.desc Normal file
View File

@ -0,0 +1,12 @@
Name: aroff
Version: 2.0
Shell: GNO, ORCA
Author: Jawaid Bazyar. Maintained by Devin Reade.
Contact: gdr@trenco.gno.org
Where: /bin
FTP: ftp.gno.org
Aroff (Apple ROFF) prints out documents that are in Appleworks GS word
processor format. It is intended primarily for use with manual pages that
have been so formatted. New manual pages should be written for nroff rather
than for aroff.

57
bin/aroff/aroff.h Normal file
View File

@ -0,0 +1,57 @@
/*
This file contains the data structures that are
used in AWGS Word Processor files.
Data structures gleaned from DTS File Type Note TN.50.8010
*/
/* #define DEBUG */
typedef struct pgraph {
word firstFont;
byte firstStyle;
byte firstSize;
byte firstColor;
word reserved;
} pgraph, *pgraphPtr;
typedef struct textBlock {
word blockSize;
word blockUsed;
pgraphPtr pgraphs;
} textBlock, *textBlockPtr;
typedef struct tabRec {
word tabLocation;
word tabType;
} tabRec, *tabRecPtr;
#define rsFULL 0x80
#define rsRIGHT 0x40
#define rsCENTER 0x20
#define rsLEFT 0x10
#define rsNOBREAK 0x08
#define rsTRIPLE 0x04
#define rsDOUBLE 0x02
#define rsSINGLE 0x01
typedef struct Ruler {
word numParagraphs;
word statusBits;
word leftMargin;
word indentMargin;
word rightMargin;
word numTabs;
tabRec tabRecs[10];
} Ruler, *RulerPtr;
typedef struct SaveArrEntry {
word textBlock; /* Text block number */
word offset; /* offset + text block = paragraph */
word attributes; /* 0 = normal text, 1 = page break paragrf */
word rulerNum; /* #of ruler associated with this paragrf */
word pixelHeight; /* height of paragraph in pixels */
word numLines; /* # of lines in this paragraph */
} saveArray, *saveArrayPtr;
extern int noboldflag;

19
bin/aroff/aroff.rez Normal file
View File

@ -0,0 +1,19 @@
/*
* $Id: aroff.rez,v 1.1 1999/01/15 08:36:31 gdr-ftp Exp $
*/
#include "Types.Rez"
#include "builddate.rez"
resource rVersion (0x1, purgeable3, nocrossbank) {
{ 2, 0, 0, /* version 1.1.0 */
release, /* development|alpha|beta|final|release */
0 /* non-final release number */
},
verUS,
"aroff",
"Apple ROFF.\n"
"Print Appleworks GS format manual pages.\n"
BUILD_DATE
};

170
bin/aroff/print.c Normal file
View File

@ -0,0 +1,170 @@
/*
print.c
the code that formats each individual paragraph is here.
$Id: print.c,v 1.3 1999/01/15 15:45:04 gdr-ftp Exp $
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <types.h>
#include <texttool.h>
#include "aroff.h"
extern saveArray *docSaveArray;
extern Ruler *docRulers;
extern textBlock **docTextBlocks; /* an array of textBlockPtrs */
extern word docSACount, numRulers, numBlocks;
/*
1 2
01234567890123456 7890
This is a bloody ^car
z = 16;
This is a bloody
^car
col=4 (width - z - 1)
printcol=3
*/
/* 100 lines should be more than enough */
char paraBuf[100][80];
/* given a paragraph, and a pointer to it's ruler, format the
paragraph according to the ruler. */
void printPara(RulerPtr ruler, pgraphPtr pptr)
{
char *txt;
int width,z;
int curLine, col, printcol, numctrl;
int i,left,style;
curLine = col = printcol = 0;
txt = ((char *)pptr) + sizeof(pgraph);
calcLine:
/* width determines how long this line is in characters; thus, where
the break for word wrap will occur */
if (curLine == 0) {
width = (ruler->rightMargin - ruler->indentMargin)/8;
} else {
width = (ruler->rightMargin - ruler->leftMargin)/8;
}
while (*txt != 0x0d) {
switch (*txt) {
case 1: txt+=3; break;
case 2:
style = *(++txt);
if (noboldflag) { /* turn off boldfacing */
++txt;
break;
}
if (style & 3) {
paraBuf[curLine][col++] = 15;
} else {
paraBuf[curLine][col++] = 14;
}
txt++;
break;
case 3: txt+=2; break;
case 4: txt+=2; break;
case 5:
case 6:
case 7: break;
default:
if (printcol == width) {
numctrl = 0;
for (z = col - 1; z > 0; z--) {
if (paraBuf[curLine][z] == ' ') {
if (z != col - 1) {
memcpy(&paraBuf[curLine+1][0],&paraBuf[curLine][z+1],
(size_t) (col - z - 1));
}
paraBuf[curLine][z] = 0;
curLine++; printcol -= (z + 1 + numctrl);
col -= (z + 1);
goto calcLine;
} else if (paraBuf[curLine][z] < ' ') {
numctrl++;
}
}
curLine++; col = printcol = 0;
/* one big word... don't break line */
goto calcLine;
}
paraBuf[curLine][col] = *(txt++);
printcol++; col++;
}
}
paraBuf[curLine][col] = 0;
for (z = 0; z <= curLine; z++) {
if (z == 0) {
width = (ruler->rightMargin - ruler->indentMargin)/8;
left = (ruler->indentMargin)/8;
} else {
width = (ruler->rightMargin - ruler->leftMargin)/8;
left = (ruler->leftMargin)/8;
}
for (i = 0; i < left; i++) {
putchar(' ');
}
printf("%s\n",paraBuf[z]);
}
}
/* this is an obsolete routine that prints a paragraph with no
formatting at all */
#ifdef NOTDEFINED
void printPara(RulerPtr ruler, pgraphPtr pptr)
{
char *txt;
txt = ((char *)pptr) + sizeof(pgraph);
while (*txt != 0x0D) {
switch (*txt) {
case 1: txt+=2; break;
case 2: txt++; break;
case 3: txt++; break;
case 4: txt++; break;
case 5:
case 6:
case 7: break;
default: putchar(*txt);
}
txt++;
}
putchar('\n');
}
#endif
/* go through each textBlock, sending each paragraph in turn to printPara. */
void printAWGS(void)
{
int z;
pgraphPtr pptr;
char *txt;
char x;
for (z = 0; z < docSACount; z++) {
pptr = (pgraphPtr) (((byte *)docTextBlocks[docSaveArray[z].textBlock])
+ docSaveArray[z].offset);
#ifdef DEBUG
fprintf(stderr, "[%d] offset %d paragraph : %08lX", z,
docSaveArray[z].offset, pptr);
fprintf(stderr, " textBlock: %08lX\n",
docTextBlocks[docSaveArray[z].textBlock]);
#endif
printPara(&docRulers[docSaveArray[z].rulerNum],pptr);
}
}

10
bin/binprint/Makefile Normal file
View File

@ -0,0 +1,10 @@
#
# $Id: Makefile,v 1.2 1999/01/16 18:35:57 gdr-ftp Exp $
#
PROG = binprint
SRCS = binprint.c doline.asm
OPTIMIZE= -1
.INCLUDE : /src/gno/prog.mk

55
bin/binprint/binprint.1 Normal file
View File

@ -0,0 +1,55 @@
.\"
.\" $Id: binprint.1,v 1.1 1999/01/16 18:35:57 gdr-ftp Exp $
.\"
.TH BINPRINT 1 "15 January 1998" GNO "Commands and Applications"
.SH NAME
.BR binprint
\- print Appleworks GS formatted manual pages
.SH SYNOPSIS
.BR binprint
[
.BI -c cols
] [
.B -V
]
.RI [ filename "] ..."
.SH DESCRIPTION
.BR binprint
displays files in hex-dump format.
.LP
For each file,
.BR binprint
will print out the
.IR filename ,
followed by one line of output for each 16 bytes of input data.
Each line consists of the file offset (in hexadecimal) of the first displayed
byte in the line, a colon, up to 16 bytes of data in hexadecimal format,
followed by the same 16 bytes shown in ASCII format:
.in 0in
.nf
binprint.c
0: 2F 2A 20 0D 20 20 20 20 42 49 4E 50 52 49 4E 54 /* . BINPRINT
10: 2E 43 0D 0D 20 20 20 20 44 69 73 70 6C 61 79 73 .C.. Displays
20: 20 66 69 6C 65 73 20 69 6E 20 68 65 78 2D 64 75 files in hex-du
.fi
.LP
Where there is no printable ASCII equivalent of a given byte, a period is
printed in its place.
.LP
If no
.IR filename s
are given,
.BR binprint
reads from stdin.
.SH OPTIONS
.IP "\fB-c\fR \fIcols\fR"
Specify the number of columns (one byte per column) to display per line.
The default as shown in the example above is 16.
Values less than 8 are silently ignored (the default is used).
.IP \fB-V\fR
Print version number and exit.
.SH HISTORY
.BR binprint
appeared in GNO v2.0.1.

107
bin/binprint/binprint.c Normal file
View File

@ -0,0 +1,107 @@
/*
BINPRINT.C
Displays files in hex-dump format (with ascii subdisplay if desired)
v1.3 Incorporated sources into GNO base build. Reformatted sources,
prototyped functions, added calls to fflush(3). (Devin Reade)
v1.2 Optimized and fixed input from terminal bug (Phil Vandry)
v1.1 Added stacksize directive (Jawaid Bazyar)
v1.0 Original version by Derek Taubert
$Id: binprint.c,v 1.3 1999/01/16 18:35:57 gdr-ftp Exp $
*/
#define VERSION "1.3"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <gno/gno.h> /* for stack checking routines */
unsigned int doline(char *dest, char *source, unsigned int actual,
unsigned int cols);
static void printGood(long off, unsigned char *buf, int real, int form);
unsigned char *buffer2;
int
main(int argc, char **argv)
{
int duh;
int a;
int c, errflg = 0, columns = 16;
size_t pos = 0;
unsigned char *buffer;
__REPORT_STACK();
while ((c = getopt(argc,argv, "Vc:")) != EOF)
switch (c) {
case 'c' :
columns = atoi(optarg);
break;
case 'V' :
fprintf(stdout, "binprint v%s for GNO/ME\n", VERSION);
exit(0);
default :
errflg++;
}
if (errflg) {
fprintf(stderr,"usage: binprint [-c<columns>] files...\n");
exit(2);
}
argv += optind;
if (columns < 8) columns = 8;
if ((buffer2 = (unsigned char *)malloc((size_t)(columns*4)+1)) == NULL) {
fprintf(stderr,"Cannot allocate buffer space\n");
exit(1);
}
buffer = (unsigned char *)(buffer2+(columns*3));
if (optind == argc) {
duh = STDIN_FILENO;
goto action;
}
for (;optind<argc;optind++) {
if ((duh = open(*argv,O_RDONLY|O_BINARY)) == -1) {
fprintf(stderr,"error opening %s\n",*argv);
exit(1);
}
printf("\n%s\n",*argv);
fflush(stdout); /* we write to STDOUT_FILENO directly */
action:
while ((a = (int)read(duh, buffer,
(size_t)(columns * sizeof(unsigned char)))) != 0) {
printGood(pos,buffer,a,columns);
pos += a;
}
close(duh);
}
free(buffer);
free(buffer2);
exit(0);
}
static void
printGood(long off, unsigned char *buf, int real, int form)
{
if (!real) return;
#if 0
printf("%8lX: ",off);
fflush(stdout);
#endif
/* The following is a hack required because of buffering by the stdio
libraries. I wish it was not necesary... */
{
static char puthere[11];
int howmany;
howmany = sprintf(puthere,"%8lX: ",off);
write(STDOUT_FILENO, puthere, (size_t)howmany);
}
write(STDOUT_FILENO, buffer2, (size_t)doline(buffer2,buf,form,real));
}

View File

@ -0,0 +1,10 @@
Name: binprint
Version: 1.3
Shell: GNO, ORCA
Author: Derek Taubert.
Contact: taubert@geeks.org
Where: /bin
FTP: ftp.gno.org
binprint displays files in hex-dump format. It also provides an ASCII
subdisplay if it is so desired.

18
bin/binprint/binprint.rez Normal file
View File

@ -0,0 +1,18 @@
/*
* $Id: binprint.rez,v 1.1 1999/01/16 18:35:57 gdr-ftp Exp $
*/
#include "Types.Rez"
#include "builddate.rez"
resource rVersion (0x1, purgeable3, nocrossbank) {
{ 1, 3, 0, /* version */
release, /* development|alpha|beta|final|release */
0 /* non-final release number */
},
verUS,
"binprint",
"Displays data in hex-dump format.\n"
BUILD_DATE
};

129
bin/binprint/doline.asm Normal file
View File

@ -0,0 +1,129 @@
*
* $Id: doline.asm,v 1.2 1999/01/16 18:35:57 gdr-ftp Exp $
*
dummy start ; ends up in .root
end
setcom 60
case on
doline start
pha
tsc
phd
tcd
phb
phk
plb
counter equ 1
RTLs equ 3
dest equ 6
source equ 10
cols equ 14
actual equ 16
PREVIOUS equ 18
pei actual
stz counter
ldy #0
loop anop
lda [source],y
jsr puthex
iny
dec cols
dec actual
bne loop
ldy counter
loop2 lda cols
beq done
lda #$2020
sta [dest],y
iny
sta [dest],y
iny
iny
dec cols
bra loop2
done anop
pla
sta actual
tya
clc
inc a
adc actual
sta counter
ldy actual
chrloop dey
cpy #$ffff
beq endloop
lda [source],y
and #$ff
cmp #$7f
bcs noprint
cmp #$20
bcs printable
noprint lda #'.'
printable sep #$20
sta [source],y
rep #$20
bra chrloop
endloop ldy actual
dey
lda [source],y
and #$00ff
ora #$0d00
sta [source],y
ldy counter
plb
lda 4
sta PREVIOUS-2
lda 3
sta PREVIOUS-3
pld
tsc
clc
adc #PREVIOUS-4
tcs
tya
rtl
end
puthex private
counter equ 1
RTLs equ 3
dest equ 6
source equ 10
cols equ 14
phy
ldy counter
pha
lsr a
lsr a
lsr a
lsr a
and #$f
tax
lda hexdigits,x
sta [<dest],y
iny
pla
and #$f
tax
lda hexdigits,x
and #$00ff
ora #$2000
sta [<dest],y
iny
iny
sty counter
ply
rts
end
hexdigits privdata
dc c'0123456789ABCDEF'
end

View File

@ -4,6 +4,6 @@ Shell: GNO
Author: Dave Tribby (from FreeBSD code)
Contact: tribby@cup.hp.com
Where: /bin
FTP: ground.isca.uiowa.edu apple2.caltech.edu trenco.myrias.com
FTP: ground.icaen.uiowa.edu apple2.caltech.edu ftp.gno.org
Concatenate and list files.

View File

@ -1,29 +0,0 @@
# gsh script to run tests and collect results
# Written by Dave Tribby * August 1997
# $Id: fulltests,v 1.3 1997/10/03 03:58:54 gdr Exp $
# Name of gsh script containing test cases
set command="dotests"
# Sometimes the file type is modified by editing; make it executable
chtyp -l exec $command
# Filenames for raw and modified results
set raw_file="/tmp/rawlist"
set result_file="test.list"
# Location of tr command that knows how to handle classes
set trcmd="/src/gno/usr.bin/tr/tr"
# --- Begin the tests ---
echo -n "Executing test script \"$command\" from directory "
pwd
# Create a new gsh invocation and record all I/O
echo "$command ; exit" | script $raw_file
# Cleanup control chars using either of the following...
echo "Done with tests. Removing control characters from results file"
$trcmd -c -ds '[:print:]\r' '\r' < $raw_file > $result_file
echo "Tests results have been saved as \"$result_file\""

11
bin/center/Makefile Normal file
View File

@ -0,0 +1,11 @@
#
# $Id: Makefile,v 1.2 1999/02/16 06:04:11 gdr-ftp Exp $
#
PROG = center
SRCS = center.c
STACK = 768
# observed stack: 676 bytes
.INCLUDE : /src/gno/prog.mk

29
bin/center/center.1 Normal file
View File

@ -0,0 +1,29 @@
.\"
.\" $Id: center.1,v 1.1 1999/02/16 06:04:11 gdr-ftp Exp $
.\"
.TH CENTER 1 "15 February 1999" GNO "Commands and Applications"
.SH NAME
.BR center
\- print centered text to stdout
.SH SYNOPSIS
.BR center
.I columns
.I file
.SH DESCRIPTION
.BR center
is a simple utility for centering text on a screen.
.I columns
is the number of columns that are considered to be the width of a full screen.
The default and maximum widths are both 80 columns.
Text is read from the input file
.I file
and printed to stdout.
.SH BUGS
.B center
should be able to read from stdin.
.LP
.B center
would be more useful if it took arbitrary screen widths into account,
including over 80 columns. Less than about 5 or 10 is probably unnecessary.
.SH AUTHOR
Marek Pawlowski.

124
bin/center/center.c Normal file
View File

@ -0,0 +1,124 @@
/* "center", (c) 1992 Marek Pawlowski. v1.0
Takes input from stdin, center's it, and puts it to
stdout.
v1.1 compiled for GNO Base Distribution. Devin Reade, 15 February 1999
Usage: center [Columns] [File]
Columns The number of columns are to be considered
"full-screen" for centering. Default 80.
File Stream to read input from. Default stdin.
This utility is in the public domain, along with
source code. Munge at will. Contact author for
redistribution rights, or inclusion in package.
Credit to Marek Pawlowski must be retained in
modified source code.
I'd like to see what you did to my source code, when
you change it. Correspond with the author (Marek
Pawlowski) at the following Email addresses:
marekp@pnet91.cts.com
marekp@cerf.net
$Id: center.c,v 1.2 1999/02/16 06:04:11 gdr-ftp Exp $
*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <gno/gno.h>
#define VERSION "1.1"
static void center(FILE *stream, int t);
char input[81];
char output[81];
static void usage(const char *file);
int
main(int argc, char **argv)
{
int t, i, x, s, fflag, len, c;
FILE *in;
__REPORT_STACK();
if (argc > 3) {
usage(argv[0]);
}
s = 1;
if(argc > 1) {
len = strlen(argv[1]);
for(x = 0 ; x <= (strlen(argv[1])-1) ; x++) {
s = isdigit(argv[1][x]);
t = atoi(argv[1]);
if (t>80) {
t = 80;
}
}
}
else if (argc == 1)
t = 80;
fflag = 0;
if (argc == 3) {
in = fopen(argv[2], "r");
if (!in) {
fprintf(stderr, "%s: cannot open %s\n", argv[1], argv[2]);
exit(1);
}
fflag = 1;
}
if(s != 0) {
if(fflag == 1)
center(in, t);
else
center(stdin, t);
} else {
usage(argv[0]);
}
return 0;
}
/* Function to call on other subroutines to result in a completely
centered line! */
static void
center(FILE *stream, int t)
{
int x, i, j;
while(feof(stream) == 0) {
fgets(input, 80, stream);
i = (t - strlen(input)) / 2;
for (j = 0; j<i; j++) {
output[j] = ' ';
}
for(x = 0 ; x <= strlen(input) ; x++)
output[i+x] = input[x];
if(feof(stream) == 0)
fputs(output, stdout);
}
}
/* Function to display the usage of the utility */
static void
usage(const char *file)
{
fprintf(stderr, "Usage: %s [columns] [file]\n", file);
exit(1);
}

9
bin/center/center.desc Normal file
View File

@ -0,0 +1,9 @@
Name: center
Version: 1.1
Shell: GNO
Author: Marek Pawlowski. Maintained by Devin Reade.
Contact: gdr@trenco.gno.org
Where: /bin
FTP: ftp.gno.org
Take text from a file (or stdin), center it, and print it to stdout.

18
bin/center/center.rez Normal file
View File

@ -0,0 +1,18 @@
/*
* $Id: center.rez,v 1.1 1999/02/16 06:04:12 gdr-ftp Exp $
*/
#include "Types.Rez"
#include "builddate.rez"
resource rVersion (0x1, purgeable3, nocrossbank) {
{ 1, 1, 0, /* version */
release, /* development|alpha|beta|final|release */
0 /* non-final release number */
},
verUS,
"center",
"Center text to stdout.\n"
BUILD_DATE
};

View File

@ -4,29 +4,24 @@
# Created by Dave Tribby, August 1997
# Modified by Evan Day, September 1997
#
# $Id: Makefile,v 1.1 1997/10/03 05:06:50 gdr Exp $
# $Id: Makefile,v 1.2 1998/02/19 02:03:15 gdr-ftp Exp $
# Program name
PROG= chtyp
# Source files
SRCS= chtyp.c ftypes.c
PROG = chtyp
SRCS = chtyp.c ftypes.c
# If optimization wasn't set on the command line use 79, since
# chtyp has been tested to work at that level.
.IF $(OPTIMIZE) == $(NULL)
OPTIMIZE=79
.END
OPTIMIZE*= 79
# Current implementation is using 960 bytes give or take
STACK = 1024
# Installation point
BINDIR = /bin
.INCLUDE : /src/gno/prog.mk
#
# Additional dependancies
# Additional dependancies.
#
chtyp.o:: ftypes.h
ftypes.o:: ftypes.h
ftypes.o: ftypes.h
chtyp.o: ftypes.h

View File

@ -1,9 +1,9 @@
Name: df
Name: chtyp
Version: 2.0.0 (28 Sep 97)
Shell: GNO/ME
Author: Evan Day
Contact: day@engr.orst.edu
Where: /bin
FTP:
FTP: ftp.gno.org
Set GS/OS file types.

View File

@ -4,31 +4,24 @@
# Created by Dave Tribby, August 1997
# Modified by Evan Day, September 1997
#
# $Id: Makefile,v 1.2 1997/10/05 16:41:59 gdr Exp $
# $Id: Makefile,v 1.3 1998/02/19 02:05:06 gdr-ftp Exp $
# Program name
PROG= cmp
# Source files
SRCS= cmp.c misc.c rcmp.c special.c
# If optimization wasn't set on the command line use 79, since
# cmp has been tested to work at that level.
.IF $(OPTIMIZE) == $(NULL)
OPTIMIZE=79
.END
OPTIMIZE *= 79
# Current implementation is using ~1050 bytes give or take
STACK = 1280
# Installation point
BINDIR = /bin
.INCLUDE : /src/gno/prog.mk
#
# Additional dependancies
#
cmp.o:: extern.h
misc.o:: extern.h
rcmp.o:: extern.h
special.o:: extern.h
cmp.o: extern.h
misc.o: extern.h
rcmp.o: extern.h
special.o: extern.h

View File

@ -4,7 +4,7 @@ Shell: GNO/ME
Author: Evan Day (from FreeBSD source)
Contact: day@engr.orst.edu
Where: /bin
FTP:
FTP: ftp.gno.org
cmp compares and reports differences in the dataforks and resource forks
of two files.

6
bin/date/NOTES Normal file
View File

@ -0,0 +1,6 @@
date.asm is 41% faster and one third of the size of date.c, the
original. Also uses 60% less stack space. Assembly can really make a
hell of a difference.
Will work under GNO or ORCA. Also fixes two small problems with the
original date utility.

34
bin/date/README Normal file
View File

@ -0,0 +1,34 @@
date
====
I wrote this just so I could see how much smaller than asm version would be
as compared to the C version. It turned out to be a great deal smaller, and
faster too - even with its additional options which I added later.
-V Version info.
-u continuously update the date on the screen. Killing the process will
force a "clean" exit.
mkfs
====
Basically FormatGS and EraseDiskGS in one. I was tired of using an old "Init"
program from ORCA 1.x, so I wrote a GNO one. This one supports specifying
the file system by name in addition to the options the old Init used to
support.
See the manpage for details.
cal
===
Yeah, I did it again. I wrote a program that already existed. (notice that all
the files in this archive are this type of program). So what, it didn't take
long!
I didn't rewrite this one from scratch. I just added a few lines to the "cal"
that came with GNO (1.0) so that it would print a calendar for the current
month if no month is specified. This is how UNIX cal behaves.
This is the very first thing I did when I got ORCA/C (Finally!) last week.

274
bin/date/date.asm Normal file
View File

@ -0,0 +1,274 @@
* asm version of date utility
* Phillip Vandry, May 1993
mcopy date.mac
keep date
copy 13/asmdefs/gno/e16.ioctl
cline gequ 0
main start
phk
plb
sty cline
stx cline+2
stz uflag
ldy #8
lpp15 lda [cline],y
and #$ff
beq ok
iny
cmp #$20
bne lpp15
lpp20 lda [cline],y
and #$ff
beq ok
iny
cmp #$20
beq lpp20
cmp #$22
beq lpp20
cmp #'-'
bne showusg
lda [cline],y
and #$ff
cmp #'V'
beq showvers
cmp #'c'
beq updateflag
showusg ~ErrWriteCString #usage
bra getoutPASS
showvers ~WriteCString #versstr
getoutPASS brl getout
updateflag inc uflag
ok anop
lda #2 ; SIGINT
jsr handle
lda #15 ; SIGTERM
jsr handle
pha
pea 2 ; stdout
pea TIOCGETP|-16
pea TIOCGETP
pea sgttyb|-16
pea sgttyb
pea errno|-16
pea errno
ldx #$2603
jsl $e10008
pla
lda sgttyb+4
sta oldflags
and #$ffef
sta sgttyb+4
jsr csetp
lda oldflags
sta sgttyb+4
refresh anop
pha
pha
pha
pha
~ReadTimeHex
lda #year+3
sta cline
lda 4,s
and #$ff
clc
adc #1900
ldx #4
jsr insert
lda 1,s
and #$ff
ldx #2
jsr insert
jsr unpad
pla
xba
and #$ff
ldx #2
jsr insert
jsr unpad
pla
and #$ff
ldx #2
jsr insert
jsr unpad
lda 1,s
and #$ff
inc a
ldx #2
jsr insert
phk
plb
pla
jsr lookup
lda months,x
sta month
lda months+1,x
sta month+1
pla
jsr lookup
lda weekdays-3,x
sta weekday
lda weekdays-2,x
sta weekday+1
WriteGS ramit
lda uflag
beq exitall
pea 1
case on
jsl sleep
case off
brl refresh
exitall WriteGS justnewl
jsr csetp
getout QuitGS qtrec
csetp anop
pha
pea 2
pea TIOCSETP|-16
pea TIOCSETP
pea sgttyb|-16
pea sgttyb
pea errno|-16
pea errno
ldx #$2603
jsl $e10008
pla
rts
uflag ds 2
handler anop
phb
plx
ply
pla
pla
phy
phx
plb
lda #1
case on
sta >ringring
case off
lda #0
sta >uflag
rtl
handle anop
pha
pha
pha
pea handler|-16
pea handler
pea errno|-16
pea errno
ldx #$1603
jsl $e10008
pla
pla
rts
lookup xba
and #$ff
pha
asl a
asl a
sec
sbc 1,s
tax
pla
rts
unpad ldx cline
phk
plb
short m
lda |0,x
cmp #$20
bne allok
lda #'0'
sta |0,x
allok long m
rts
insert pha ; thenum
pea 0
plb
phk
lda cline
dec a
dec a
dec a
sta cline
pha
phx
pea 0
~Int2Dec *,*,*,*
rts
string anop
qtrec dc i'2'
dc a4'0'
dc i'$4000'
ramit dc i'4'
dc i'2'
dc a4'strbeg'
dc i4'strend-strbeg'
ds 4
sgttyb ds 6
oldflags ds 2
strbeg anop
weekday dc c'xxx '
month dc c'xxx '
day dc c'xx '
hour dc c'xx:'
minute dc c'xx:'
second dc c'xx '
year dc c'xxxx'
dc h'0d'
strend anop
justnewl dc i'4'
dc i'2'
dc a4'justnewl1'
dc i4'1'
ds 4
justnewl1 dc h'0a'
weekdays dc c'SunMonTueWedThuFriSat'
months dc c'JanFebMarAprMayJunJulAugSepOctNovDec'
versstr dc c'date utility, asm version 1.1'
dc h'0d 0a'
usage dc c'usage: date [-cV]',h'0d 0a'
dc h'0'
end
errno data
ds 2
end
copy modsleep.asm
dpstk data ~Direct
kind $12
ds 512
end

View File

@ -1,16 +1,15 @@
macro
&lab ~DisposeHandle &p1
&lab ph4 &p1
ldx #$1002
&l ~Int2Dec &p1,&p2,&p3,&p4
&l ph2 &p1
ph4 &p2
ph2 &p3
ph2 &p4
ldx #$260B
jsl $E10000
mend
macro
&lab ~NewHandle &p1,&p2,&p3,&p4
&lab ph4 &p1
ph2 &p2
ph2 &p2
ph4 &p4
ldx #$0902
&l ~ReadTimeHex
&l ldx #$0D03
jsl $E10000
mend
macro
@ -56,7 +55,6 @@
pha
ago .e
.c
&n1 amid &n1,2,l:&n1-1
pei &n1
ago .e
.d
@ -101,7 +99,6 @@
ago .e
.c
aif "&c"<>"<",.c1
&n1 amid &n1,2,l:&n1-1
pei &n1+2
pei &n1
ago .e
@ -144,3 +141,33 @@
longi off
.c
mend
macro
&l quitgs &p
&l jsl $E100A8
dc i2'$2029'
dc i4'&p'
mend
macro
&l writegs &p
&l jsl $E100A8
dc i2'$2013'
dc i4'&p'
mend
macro
&l ~ErrWriteCString &p1
&l ph4 &p1
ldx #$210C
jsl $E10000
mend
macro
&l ~WriteCString &p1
&l ph4 &p1
ldx #$200C
jsl $E10000
mend
macro
&l ~WriteString &p1
&l ph4 &p1
ldx #$1C0C
jsl $E10000
mend

174
bin/date/modsleep.asm Normal file
View File

@ -0,0 +1,174 @@
* Modified sleep routine based on sleep in libgno
* It was necesary to disassemble this routine and reassemble it so that
* date.asm can use its private variables. It needs to do this to make
* date abort when it is in the middle of a sleep()
* Phillip Vandry, May 1993
case on
sleep start
tsc
sec
sbc #$0014
tcs
phd
tcd
ldx $07
phx
tsx
stx $07
pea sleephandler|-16
pea sleephandler
pea 14
jsl signal
tay
lda $07
tcs
pla
sta $07
tya
phx
pha
lda $01,s
sta $0d
lda $03,s
sta $0f
pla
pla
ldx $07
phx
tsx
stx $07
pea $0000
pea $2000
jsl sigblock
tay
lda $07
tcs
pla
sta $07
tya
phx
pha
lda $01,s
sta $11
lda $03,s
sta $13
pla
pla
lda #$0000
sta ringring
ldx $07
phx
tsx
stx $07
lda $18
ldx #$0000
phx
pha
jsl alarm
tay
lda $07
tcs
pla
sta $07
tya
checkrr anop
lda ringring
tax
beq theeor
lda #$0001
theeor eor #$0001
bne nojump
brl afterbrl
nojump ldx $07
phx
tsx
stx $07
pei $13
pei $11
pla
and #$dfff
pha
jsl sigpause
tay
lda $07
tcs
pla
sta $07
tya
brl checkrr
afterbrl ldx $07
phx
tsx
stx $07
ldx $0f
lda $0d
phx
pha
lda #$000e
pha
jsl signal
tay
lda $07
tcs
pla
sta $07
tya
ldx $07
phx
tsx
stx $07
ldx $13
lda $11
phx
pha
jsl sigsetmask
tay
lda $07
tcs
pla
sta $07
tya
lda $16
sta $18
lda $15
sta $17
ldy $05
pld
tsc
clc
adc #$0016
tcs
tya
rtl
end
sleephandler start
tsc
sec
sbc #$0006
tcs
phd
tcd
lda #$0001
sta ringring
lda $08
sta $0c
lda $07
sta $0b
pld
tsc
clc
adc #$000a
tcs
rtl
end
ringring data
ds 2
end
case off

View File

@ -4,29 +4,22 @@
# Created by Dave Tribby, August 1997
# Modified by Evan Day, September 1997
#
# $Id: Makefile,v 1.1 1997/10/03 05:42:18 gdr Exp $
# $Id: Makefile,v 1.2 1998/02/19 02:12:18 gdr-ftp Exp $
# Program name
PROG= df
# Source files
SRCS= df.c gnodf.c
# If optimization wasn't set on the command line use 79, since
# df has been tested to work at that level.
.IF $(OPTIMIZE) == $(NULL)
OPTIMIZE=79
.END
OPTIMIZE *= 79
# Current implementation is using 960 bytes give or take
STACK = 1024
# Installation point
BINDIR = /bin
.INCLUDE : /src/gno/prog.mk
#
# Additional dependancies
#
tr.o:: df.h
str.o:: df.h
df.o: df.h
gnodf.o: df.h

View File

@ -4,6 +4,6 @@ Shell: GNO/ME
Author: Evan Day (from FreeBSD source)
Contact: day@engr.orst.edu
Where: /bin
FTP:
FTP: ftp.gno.org
Displays free disk space and disk usage statistics for GS/OS block devices.

2
bin/du/Makefile Normal file
View File

@ -0,0 +1,2 @@
du: du.c
cmpl +O du.c keep=du

222
bin/du/du.c Normal file
View File

@ -0,0 +1,222 @@
#pragma stacksize 2048
/* IIGS History:
*
* v1.0 (Summer sometime)
* Original port by Derek Taubert
* v1.1 (11/30/91 jb)
* Applied stacksize directive
* v1.2 (1/21/92 jb)
* Recompiled under C 1.3 and with new libraries
* ANSI-fied the source
* v1.4 (6/16/93 jb) Recompiled under C 2.0.1a3 & with new libs
* Modified '/' to ':' to support HFS
* Fully optimized
*
* $Id: du.c,v 1.1 1998/04/10 18:13:27 gdr-ftp Exp $
*/
/*
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Newcomb.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)du.c 5.6 (Berkeley) 6/1/90";
#endif /* not lint */
#define _SYSV_SOURCE
#include <sys/param.h>
#include <sys/stat.h>
#include <dirent.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <unistd.h>
#include <errno.h>
#pragma lint -1
typedef struct _ID {
dev_t dev;
ino_t inode;
} ID;
ID *files;
dev_t device;
int crossmounts, kvalue, listdirs, listfiles, maxfiles, numfiles;
char path[MAXPATHLEN + 1];
char fixpath[MAXPATHLEN + 1];
/* Prototypes */
void du(char *arg);
u_long descend(char *endp);
int main(int argc, char **argv)
{
int ch;
char top[MAXPATHLEN + 1];
listdirs = crossmounts = 1;
while ((ch = getopt(argc, argv, "aksx")) != EOF)
switch(ch) {
case 'a':
listfiles = 1;
break;
case 'k':
kvalue = 1;
break;
case 's':
listfiles = listdirs = 0;
break;
case 'x':
crossmounts = 0;
break;
case '?':
default:
(void)fprintf(stderr,
"usage: du [-aksx] [name ...]\n");
exit(1);
}
argv += optind;
files = (ID *)malloc((size_t)(sizeof(ID) * (maxfiles = 128)));
(void)getwd(top);
if (!*argv) {
du(top);
if (chdir(top)) {
(void)fprintf(stderr, "chdir du: %s: %s\n",top,
strerror(errno));
exit(1);
}
} else {
for (;;) {
du(*argv);
if (chdir(top)) {
(void)fprintf(stderr, "chdir du: %s: %s\n",
top, strerror(errno));
exit(1);
}
if (!*++argv)
break;
}
}
exit(0);
}
struct stat info;
void du(char *arg)
{
extern int errno;
u_long total;
if (lstat(arg, &info)) {
(void)fprintf(stderr, "lstat1 du: %s: %s\n", arg, strerror(errno));
return;
}
if ((info.st_mode&S_IFMT) != S_IFDIR) {
(void)printf("%-8.8ld %s\n", kvalue ?
howmany(info.st_blocks, 2) : info.st_blocks, arg);
return;
}
device = info.st_dev;
(void)strcpy(path, arg);
total = descend(path);
if (!listfiles && !listdirs)
(void)printf("%-8.8lu %s\n",
kvalue ? howmany(total, 2) : total, path);
}
u_long descend(char *endp)
{
extern int errno;
register DIR *dir;
register ID *fp;
register struct dirent *dp;
u_long total;
if (info.st_nlink > 1) {
for (fp = files + numfiles - 1; fp >= files; --fp)
if (info.st_ino == fp->inode &&
info.st_dev == fp->dev)
return(0L);
if (numfiles == maxfiles)
files = (ID *)realloc((char *)files,
(u_int)(sizeof(ID) * (maxfiles += 128)));
files[numfiles].inode = info.st_ino;
files[numfiles].dev = info.st_dev;
++numfiles;
}
total = info.st_blocks;
if ((info.st_mode&S_IFMT) == S_IFDIR) {
if (info.st_dev != device && !crossmounts)
return(0L);
if (!(dir = opendir(endp)) || chdir(endp)) {
(void)fprintf(stderr, "opendir du: %s: %s\n",
path, strerror(errno));
return(total);
}
for (; *endp; ++endp);
#ifdef __ORCAC__
/* IIGS uses ':'s as separators */
if (endp[-1] != ':')
{ *endp++ = ':'; *endp = 0; }
#else
if (endp[-1] != '/')
*endp++ = '/';
#endif
while (dp = readdir(dir)) {
/* if (dp->d_name[0] == '.' && (!dp->d_name[1] ||
dp->d_name[1] == '.' && !dp->d_name[2]))
continue; unix only, we have no links */
/* Specify 0: for HFS filenames with slashes */
bcopy(dp->d_name, endp, dp->d_namlen + 1);
strcpy(fixpath,"0:");
strcat(fixpath,dp->d_name);
if (lstat(fixpath /*dp->d_name*/, &info)) {
(void)fprintf(stderr, "lstat du: %s: %s\n", path,
strerror(errno));
continue;
}
total += descend(endp);
}
closedir(dir);
if (chdir("..")) {
(void)fprintf(stderr, "chdir du: ..: %s\n", strerror(errno));
exit(1);
}
*--endp = '\0';
if (listdirs)
(void)printf("%-8.8lu %s\n",
kvalue ? howmany(total, 2) : total, path);
}
else if (listfiles)
(void)printf("%-8.8lu %s\n",
kvalue ? howmany(total, 2) : total, path);
return(total);
}

111
bin/edit/edit.c Normal file
View File

@ -0,0 +1,111 @@
/*
parsing code for 'edit'
1.2(jb) 10/27/91
Added support for a '$editor' variable. edit now checks this var so
users can select different editors without copying files around.
1.1(jb) 10/9/91
Removed a lot of yucky code, added error checking to make sure there
is one and only one filename specified before 'edit' does anything.
1.0(jb) Ick! Nasty! Unnecessary code everywhere! Ick!
*/
#pragma stacksize 1024
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <types.h>
#include <gsos.h>
#include <shell.h>
#include <orca.h>
#include <stddef.h>
#include <texttool.h>
#include <gno/gno.h>
#include <sys/wait.h>
char *invoke;
doError(char *err)
{
printf("%s: %s\n",invoke,err);
exit(2);
}
char sfile[65], dfile[65], parms[256], istring[256];
Get_LInfoPB gl;
ExpandPathRecGS ep;
main (int argc,char *argv[])
{
int pid,wpid;
union wait status;
GSString255Ptr inPath;
ResultBuf255Ptr outPath;
int i;
char *editname, *editinvoke, *nm, *spc;
invoke = argv[0];
if (argc < 2) doError("no filename specified");
else if (argc > 2) doError("only one filename allowed");
sfile[1] = 0;
strcat(sfile+1,argv[1]);
sfile[0] = strlen(sfile+1);
dfile[0] = parms[0] = istring[0] = 0;
gl.pflags = 0x8000000l;
gl.mflags = 0l;
gl.kflag = 0;
gl.sfile = sfile;
gl.dfile = dfile;
gl.parms = parms;
gl.istring = istring;
gl.merr = 8; gl.merrf = 0;
gl.org = 0l;
inPath = malloc((size_t) (sfile[0] + 2));
inPath->length = sfile[0];
memcpy(inPath->text,sfile+1,(size_t) sfile[0]);
outPath = malloc(sizeof(ResultBuf255));
outPath->bufSize = 255;
ep.pCount = 3;
ep.inputPath = inPath;
ep.outputPath = outPath;
ep.flags = 0;
ExpandPathGS(&ep);
if (toolerror()) { printf("edit: error %04X\n",toolerror()); exit(-1); }
sfile[0] = outPath->bufString.length;
memcpy(sfile+1,outPath->bufString.text,sfile[0]);
free(inPath);
free(outPath);
/* hmm. These could well be considered bugs in Rose */
for (i = 1; i <= sfile[0]; i++) {
if (sfile[i] == ':') sfile[i] = '/';
}
SET_LINFO(&gl);
editname = getenv("editor");
if (editname == NULL) editinvoke = editname="4/editor";
else {
nm = malloc(strlen(editname)+1); strcpy(nm,editname);
spc = strchr(nm, ' ');
if (spc == NULL) { editname = editinvoke = nm; }
else {
editinvoke = malloc(strlen(nm)+1); strcpy(editinvoke,nm);
*spc = 0; editname = nm;
}
}
if ((pid = exec(editname,editinvoke)) >= 0) {
waitlp2:
wpid = wait(&status);
if ((wpid != pid) || (status.w_stopval == WSTOPPED)) goto waitlp2;
}
else perror("edit: ");
exit(status.w_retcode);
}

View File

@ -1,87 +1,151 @@
#
# GNO Shell Makefile
# by T Meekins
# makefile for building gsh. This is for use with dmake.
#
# $Id: Makefile,v 1.9 1999/01/15 06:50:35 gdr-ftp Exp $
#
# Devin Reade, February 1998.
#
o/main.root: main.asm
purge ; compile main.asm keep=o/main
PROG = gsh
MAIN = main
MAINSRC = main.asm
SRCS = $(MAINSRC) \
shell.asm \
history.asm \
prompt.asm \
cmd.asm \
expand.asm \
invoke.asm \
shellutil.asm \
builtin.asm \
hash.asm \
alias.asm \
dir.asm \
shellvar.asm \
jobs.asm \
sv.asm \
stdio.asm \
orca.asm \
edit.asm \
term.asm \
bufpool.asm \
mmdebug.asm
o/shell.root: shell.asm m/shell.mac
purge ; compile shell.asm keep=o/shell
# Note: STACK variable does not control size of stack/direct-page segment
# since this is assembly language. Edit stack segment in main.asm
# to change this size.
o/history.root: history.asm m/history.mac
purge ; compile history.asm keep=o/history
# This is a problem. gsh was written to use the old termcap library.
# Not only do we no longer build this library, but we don't even have the
# sources for it. This needs to be changed. For the moment, use the
# ltermcap library from GNO v2.0.4.
#
# LDADD = -ltermcap
LDLIBS += -l/usr/lib/libtermcap.204
o/prompt.root: prompt.asm m/prompt.mac
purge ; compile prompt.asm keep=o/prompt
# For debugging: produce a link map
## LDFLAGS += -M
o/cmd.root: cmd.asm m/cmd.mac
purge ; compile cmd.asm keep=o/cmd
# Make sure our macro files get built before trying to assemble source files.
# LOCAL_SETUP = macros
o/expand.root: expand.asm m/expand.mac
purge ; compile expand.asm keep=o/expand
CUSTOM_RELEASE = TRUE
o/invoke.root: invoke.asm m/invoke.mac
purge ; compile invoke.asm keep=o/invoke
.INCLUDE : /src/gno/prog.mk
o/shellutil.root: shellutil.asm m/shellutil.mac
purge ; compile shellutil.asm keep=o/shellutil
# We give a custom implicit rule for *.o files so that we don't get
# duplicate "dummy" symbols in the link step.
%.o: %.asm
$(AS) -o $@ $(ASFLAGS) $(__OFLAG) $<
-$(RM) -f $(OBJ_DIR)$*.root
o/builtin.root: builtin.asm m/builtin.mac
purge ; compile builtin.asm keep=o/builtin
LOCAL_MACRO_SRC = gsh.mac
MACRO_SRC = \
$(LOCAL_MACRO_SRC)
o/hash.root: hash.asm m/hash.mac
purge ; compile hash.asm keep=o/hash
# Everything should be in gsh.mac. If useful, the following could be added
# /usr/ainclude/m16.gno \
# $(ORCA_DIST)/libraries/orcainclude/m16.orca \
# $(ORCA_DIST)/libraries/orcainclude/m16.gs.os \
# $(ORCA_DIST)/libraries/orcainclude/m16.tools \
# $(ORCA_DIST)/libraries/orcainclude/m16.shell \
# $(ORCA_DIST)/libraries/ainclude/m16.pascal \
# $(ORCA_DIST)/libraries/ainclude/m16.debug
o/alias.root: alias.asm m/alias.mac
purge ; compile alias.asm keep=o/alias
MACROS = \
$(OBJ_DIR)main.mac \
$(OBJ_DIR)alias.mac \
$(OBJ_DIR)bufpool.mac \
$(OBJ_DIR)builtin.mac \
$(OBJ_DIR)cmd.mac \
$(OBJ_DIR)dir.mac \
$(OBJ_DIR)edit.mac \
$(OBJ_DIR)expand.mac \
$(OBJ_DIR)hash.mac \
$(OBJ_DIR)history.mac \
$(OBJ_DIR)invoke.mac \
$(OBJ_DIR)jobs.mac \
$(OBJ_DIR)mmdebug.mac \
$(OBJ_DIR)orca.mac \
$(OBJ_DIR)prompt.mac \
$(OBJ_DIR)shell.mac \
$(OBJ_DIR)shellutil.mac \
$(OBJ_DIR)shellvar.mac \
$(OBJ_DIR)stdio.mac \
$(OBJ_DIR)sv.mac \
$(OBJ_DIR)term.mac
o/dir.root: dir.asm m/dir.mac
purge ; compile dir.asm keep=o/dir
MANPAGES_1 = \
man/alias.1 \
man/cd.1 \
man/clear.1 \
man/exit.1 \
man/gsh.1
o/shellvar.root: shellvar.asm m/shellvar.mac
purge ; compile shellvar.asm keep=o/shellvar
macros: $(MACROS)
o/jobs.root: jobs.asm m/jobs.mac
purge ; compile jobs.asm keep=o/jobs
$(OBJ_DIR)%.mac: %.asm
@echo making $@
@$(MACGEN) $(MACGEN_FLAGS) $*.asm $@ $(MACRO_SRC)
o/sv.root: sv.asm m/sv.mac
purge ; compile sv.asm keep=o/sv
$(MACROS): $(LOCAL_MACRO_SRC)
o/stdio.root: stdio.asm m/stdio.mac
purge ; compile stdio.asm keep=o/stdio
$(OBJ_DIR)alias.mac: $(MACRO_SRC)
$(MACGEN) $(MACGEN_FLAGS) alias.asm $@ $(MACRO_SRC)
o/orca.root: orca.asm m/orca.mac
purge ; compile orca.asm keep=o/orca
# Place files where they will subsequently be archived in a binary
# distribution.
release: $(OBJ_DIR)$(PROG) $(MANPAGES_1) $(DESC)
$(INSTALL) -d $(RELBIN) $(RELMAN)/man1 $(DESC_DIR)
$(INSTALL) $(OBJ_DIR)$(PROG) $(RELBIN)
$(INSTALL) $(MANPAGES_1) $(RELMAN)/man1
$(DESCU) -o $(DESC_SRC) $(DESC_SRC) $(DESC)
o/edit.root: edit.asm m/edit.mac
purge ; compile edit.asm keep=o/edit
# Install files into a live system. This doesn't update the describe
# database.
install: $(OBJ_DIR)$(PROG) $(MANPAGES_1)
$(INSTALL) -d $(BINDIR) $(MANDIR)/man1
$(INSTALL) $(OBJ_DIR)$(PROG) $(BINDIR)
$(INSTALL) $(MANPAGES_1) $(MANDIR)/man1
o/term.root: term.asm m/term.mac
purge ; compile term.asm keep=o/term
o/bufpool.root: bufpool.asm m/bufpool.mac
purge ; compile bufpool.asm keep=o/bufpool
shell: o/main.root \
o/shell.root \
o/history.root \
o/prompt.root \
o/cmd.root \
o/expand.root \
o/invoke.root \
o/shellutil.root \
o/builtin.root \
o/hash.root \
o/alias.root \
o/shellvar.root \
o/jobs.root \
o/dir.root \
o/sv.root \
o/stdio.root \
o/orca.root \
o/edit.root \
o/term.root \
o/bufpool.root \
direct.root
pwd ; purge ; compile link.script keep=gsh
$(ODIR)alias.o: $(OBJ_DIR)alias.mac
$(ODIR)bufpool.o: $(OBJ_DIR)bufpool.mac
$(ODIR)builtin.o: $(OBJ_DIR)builtin.mac
$(ODIR)cmd.o: $(OBJ_DIR)cmd.mac
$(ODIR)dir.o: $(OBJ_DIR)dir.mac
$(ODIR)edit.o: $(OBJ_DIR)edit.mac
$(ODIR)expand.o: $(OBJ_DIR)expand.mac
$(ODIR)hash.o: $(OBJ_DIR)hash.mac
$(ODIR)history.o: $(OBJ_DIR)history.mac
$(ODIR)invoke.o: $(OBJ_DIR)invoke.mac
$(ODIR)jobs.o: $(OBJ_DIR)jobs.mac
$(ODIR)main.o: $(OBJ_DIR)main.mac
$(ODIR)mmdebug.o: $(OBJ_DIR)mmdebug.mac
$(ODIR)orca.o: $(OBJ_DIR)orca.mac
$(ODIR)prompt.o: $(OBJ_DIR)prompt.mac
$(ODIR)shell.o: $(OBJ_DIR)shell.mac
$(ODIR)shellutil.o: $(OBJ_DIR)shellutil.mac
$(ODIR)shellvar.o: $(OBJ_DIR)shellvar.mac
$(ODIR)stdio.o: $(OBJ_DIR)stdio.mac
$(ODIR)sv.o: $(OBJ_DIR)sv.mac
$(ODIR)term.o: $(OBJ_DIR)term.mac

View File

@ -1,44 +1,56 @@
Need to modify Tim's mutex code to be:
Last updated: Nov. 26, 1999 By: Dave Tribby
t lda #1
tsb mutex
beq go
cop $7F
bra t
go ; execute code here
------------------------------------
For more bug reports, see http://www.gno.org/~gno/bugs.html
coolish handling of setdebug by editor.
Completed items are reported in file UpdateLog.
When building the EXE hash table, duplicate entries oughta should be ignored.
Determine why gsh gets SIGTTIN (background read attempted signal) when
it executes a very quickly executing child program. Currently gsh
quits in order to avoid waiting forever, but that may not always be a
good strategy.
Rather than have each built-in command always be either forked or
non-forked, check dynamically and only fork when it's really necessary
(background or piped). Something like this:
If process is in background (&) or piped (|), then fork.
Otherwise: if redirecting I/O, then
copy file descriptor(s)
open new stdin, stdout, and/or stderr
Execute process.
If I/O was redirected, then
close redirected file(s)
reconnect stdin, stdout, and/or stderr
Note: routine "command" sets srcfile and dstfile.
Identify limits built into gsh and how they can be changed; for example,
command line cannot expand to > 1024 characters.
When a background process finishes and there's text in the input buffer,
the next keypress correctly reprints the edit line but the key itself does
not get put in the buffer.
running a process in the background from inside a script (not 'source',
but executing the script as a command) causes the shell to wait for that
background process to end - not exactly what we want.
recursive aliases.
multiple files for 'edit'.
'df' lists a bunch appleshare shit.
change updatevars to do a read_variable for better performance (and
for correctness!)
-a in ps (and any other redeemable switches)
Gsh requires the v2.0.4 ltermcap to link. A new version of the termcap
library is proposed for GNO v2.0.6, and gsh may require updates.
job control monitor for defunct processes when waiting.
usage for alias and hash
job control needs to save tty information.
echo should use octal and hex \12 is dec, \012 is octal, \x12 is hex.
Allow ~user construct (call routines to get user's home directory)
recursive aliases.
In expandvars (expand.asm):
Add error checking if out buf gets too big (> 1024)
Get rid of fixed buffers
[ -- below this line...probably never will be done -- ]
write new memory management.
coolish handling of setdebug by editor.
echo should use octal and hex \12 is dec, \012 is octal, \x12 is hex.
write history expansion.

View File

@ -1,5 +1,511 @@
GSH 1.1 UPDATES...
GSH 2.0 UPDATES
^^^^^^^^^^^^^^^
Nov 26 99 [dmt] Cleanup tests directory and update its Makefile.
Nov 22 99 [dmt] Add environment variable flags $ECHOX and $KEEPQUOTE
that modify the behavior of gsh. [shellvar.asm, cmd.asm]
If set, $ECHOX causes gsh to echo a single expanded command.
(In previous versions of gsh 2.0, this was temporary code
that was executed whenever $ECHO was set.)
If set, $KEEPQUOTE tells gsh to use the user's original
single and double quotes, rather than removing them and
adding double quotes as needed. This resolves PR#50 and,
if a child program re-parses its parameters, also resolves
PR#34 (gsh messes up nested quotes).
Nov 18 99 [dmt] Fix PR#123: command line parsing ended if a ";"
delimited a null command (echo "Test 1" ; ; echo "Test2"
would only echo the first string). Modified cmd.asm
Sep 6 99 [dmt] Add comments to ioctl calls in edit.asm.
Sep 1 99 [dmt] Added signal handler for SIGTTIN (signal #21, background
read attempted from control terminal) that prints a message
and quits the shell. This was needed because gsh will sometimes
receive such a signal, go into the "suspended" state, and never
return to "running" state.
Feb 11 99 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d10 (displays as 2.0d?)
Feb 2 99 [dmt] Changed maxline_size from 1024 to 4096.
Recode copy loop in expandalias to be more efficient.
Feb 1 99 [dmt] Change names of alloc1024 and free1024 to allocmaxline
and freemaxline (many .asm files) in anticipation of changing
the maximum line size from 1024. Reviewed all uses of 1024
constants, and changed appropriately to use new bufpool.asm
location maxline_size.
While reviewing 1024 constants, determined that shell.asm was
using "buffer" for reads with max len of 1024, when it really
had a size of 256. Changed "buffer" to "cmdline" and "1024"
to "cmdbuflen". Removed definitions of buffer and wordbuf
(each ds 256) from global data area, since they were unused.
Jan 30 99 [dmt] Add check for output buffer overflow when globbing, and
print error message (PR#110). Code restructured to use
base address and offset, so that offset could easily be checked
against limit. Also moved allocation/deallocation of two buffers
outside a loop. (expand.asm)
Add check for overflow when expanding variables (expand.asm)
and allow command processor to recognize error (cmd.asm).
Modify alias expansion not to treat "." as escaped character,
to truly eat leading blanks (per comments), and to check for
buffer overflow (alias.cmd). (Also tightened up the code.)
Jan 13 99 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d9
Jan 12 99 [dmt] Add debug routine DB~CHKBNK, which causes BRK B0 if
program bank is not the same as data bank (mmdebug.asm).
Modify lock and unlock macros to call DB~CHKBNK (gsh.mac).
Needed to change branch instructions to jump macros in several
files because the code got larger.
Jan 11 99 [dmt] Lock/unlock hashmutex in dispose_hash (hash.asm).
Jan 3 99 [dmt] Allow five digits rather than four when printing process
id number in the ps command (builtin.asm).
Jan 1 99 [dmt] Piping the output of a command to a non-executable
file caused gsh to hang. Instead of going directly to done
after printing "Not executable" error message, go to chkpipe
in invoke.asm.
Dec 31 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d8
Dec 30 98 [dmt] Added mutual exclusion to ~NEW and ~DISPOSE macros. Lack
of mutex could cause one fork to modify a memory table while
another fork was searching it, leaving one or both processes
in an infinite loop. This caused some recoding in nullfree
(shellutil.mac), since we have to unlock the mutex after
calling ~DISPOSE but before returning to the caller.
Dec 29 98 [dmt] For some sizes of the hash table, the hash command
would sometimes print an entry more than once. Made 2 changes
to sv_colprint (in sv.asm): 1) Ensure the number of columns is
never > number of entries. This is only a problem when there are
fewer than 6 files hashed. 2) Never look beyond the number of
entries stored in offtbl. Results could be affected by the
previous call to sv_colprint.
Dec 28 98 [dmt] Review code for mutual exclusion requirements.
= Change jsl to builtin subroutine near "foundit" in builtin.asm
into stack setup followed by rts, so that mutex is not required
to protect the setup and execution of the invocation.
= Add AliasMutex to protect data used by alias and unalias
commands (alias.asm)
= Remove pwdmutex from pwd command (builtin.asm).
= Remove mutex from dotods routine (dir.asm).
= Add DirMutex (for DirData) to dirs, pushd, and popd commands
(dir.asm).
= Add offtblmutex to sv_colprint routine (sv.asm).
= Change ErrorGS and SetGS calls so that parameter blocks are
on the stack for ShellExec (cmd.asm).
= Add lock/unlock of hashmutex to search routine so that the
hash function is protected. (hash.asm)
Dec 27 98 [dmt] Running a process in the background from inside a
script (not 'source', but executing the script as a command)
caused the script to wait for that background process to end.
Caused the script to run without waiting by checking for
background processing near beginning of "infork" (invoke.asm).
Because the parent process is the script, not gsh, when control
returns to gsh the script has terminated and the parent process
ID is 1 (null process). gsh cannot use its normal job control
commands, except "kill <pid>" (not "kill %<job>") works.
Dec 26 98 [dmt] Make gsh globbing work more like csh: if none of the
requested patterns are found, print "No match" and exit.
Dec 23 98 [dmt] At startup, if /etc/glogin, $HOME/glogin, or $HOME/gshrc
does not exist, skip "file not found" error message. (PR#100)
Dec 21 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d7
Dec 20 98 [dmt] For calls to system(), if input pointer is null or
lower level routines detect an error, return -1. This change
caused change to internal routine execute(): return -1 rather
than 0 when an error is detected.
Detect when non-forked builtin or directory name as command
is combined with piped I/O, and ensure that situation is
properly cleaned up. (Formerly, "clear | cat > /tmp/list"
would cause a nasty crash.)
Dec 18 98 [dmt] In execute() (cmd.asm), when child process isn't active
and has no entry in the pid list, assume that pchild() has
already set $status rather than forcing $status to 0.
Dec 17 98 [dmt] argv and argc parameters were reversed in PrintHistory().
This didn't make a difference until argc was checked for != 0.
Dec 16 98 [dmt] Added waitstatus address parameters to command() and
invoke() so completion status can be reported from unforked
builtin commands. Added code in execute() to set status
reported from unforked builtin commands.
Reviewed all built-in commands to ensure they report 0 for
no error and 1 for error.
Fixed memory corruption error when edit command had no
parameters (it called free1024 with random address).
Added usage strings for tset, hash, commands, and history.
Dec 13 98 [dmt] Resolved (or at least closed the window of opportunity
on) defects reported in Oct. 6 and 10 entries. When a process
terminated quickly [kill(pid,0) returned -1], that child's
termination could interfere with detecting the next child's
termination. Solution: Modify removejentry() (jobs.asm) to
return 1 if entry is in list (indicating we expected status
from it) and 0 if it isn't. Modify execute (cmd.asm) to get
status via wait() if and only if removejobentry() returns 1.
Previously, the following exec file often resulted in a hang:
# Create exec file
set tmpcmd=/tmp/testcmds
echo "echo Sourcing $tmpcmd" > $tmpcmd
echo "/bin/ps -l" >> $tmpcmd
chtyp -l exec $tmpcmd
# Source that file; usually doesn't return
source $tmpcmd
Dec 5 98 [dmt] If either glogin file rehashed (for login shells only),
that hash table's memory pointer was overwritten but not
deallocated in shell (shell.asm). Fixed by adding a call to
dispose_hash before calling hashpath.
Nov 29 98 [dmt] Fix memory leak: deallocate name returned by hash
search in invoke (invoke.asm) and which (builtin.asm).
Deallocate path string in invoke by passing it as a new
parameter to argfree, so that it is deallocated only after
the child process is done with it.
Nov 28 98 [dmt] When allocating memory for return string containing
full path in search (hash.asm), add lengths of path + name + 1
rather than path + 33.
Nov 18 98 [dmt] Fix memory leak: when null command was encountered,
the empty command line and argv array were not deallocated.
Nov 12 98 [dmt] prefix command without parameters should not try to
deallocate PRecPath, since it was not used. Causes corruption
when PRecPath contains a value; fixed by jumping to done
rather than finish. Also, jump into "allloop" earlier and
avoid 9 lines of duplicate code.
Nov 2 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d6
Oct 29 98 [dmt] Defect introduced into 2.0d5 fixed: when background job
completed, GetCmdLine thought there was an error on stdin. It
printed a bogus error message and then quit.
Oct 26 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d5
Oct 10 98 [dmt] Found race condition: when forked process completes
quickly, the parent process may not ever receive its completion
signal. Fix: ensure process exists by calling kill(pid,0)
and checking status before calling pwait (cmd.asm).
Change calls to set and reset handler for signal 17 (SIGSTOP)
to do it for signal 18 (SIGTSTP) (17 can't be caught; 18 is).
Oct 7 98 [dmt] Check for directory stack full in pushd, and report
new error message: 'pushd: Directory stack full'. (Previously,
50 pushds would cause a crash.)
Check for parameter in pushd "+n" <=0, and report a new error
message: 'pushd: Invalid number'. (Previously, tried to chdir
to the parameter.)
Oct 6 98 [dmt] Before calling pwait (to wait for child process) in
cmd.asm, enable the child status signal handler; change it
back to its previous state after the pwait call. This partially
fixes the problem of the shell waiting forever when a shell
exec file sources another exec file that contains a command
that causes a fork.
command() checked for argv==0 before calling invoke(), but
invoke() also checks. Move invoke()'s error message ("specify
a command before redirecting.") into command().
Sep 27 98 [dmt] Add quotes around null parameters on the command line
so they are parsed by the target command (PR#84)
Sep 25 98 [dmt] If a command appends to stdout (echo test >>&/tmp/err),
then stdin gets closed. This was due to errappend being
defined as pipefds+2 rather than pipefds+4 in cmd.asm.
Sep 23 98 [dmt] If there is an error reading stdin, gsh would go into
an infinite loop of beeping and requesting more input. Changed
getchar (in stdio.asm) and GetCmdLine (in edit.asm) to report
the error and terminate.
Sep 9 98 [dmt] Output piped to an unfound command caused gsh to
terminate. This was due to an interface change to getpgrp(2):
it now returns the process group of the caller. To get the
process group number of the parameter pid, the call has to
be made to _getpgrp(2). This change was made in invoke.asm to
fix the bug. Additional updates were made in jobs.asm.
Sep 7 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d4
Sep 7 98 [dmt] In "gettoken" (cmd.asm), decrement buf (pointer to
command line) when EOL is reached; otherwise if the character
following the command in the buffer is non-zero, the garbage
after the real command will be interpreted as another command.
Test case: "> /tmp/list" would cause "not found" error message.
Sep 6 98 [dmt] Added startup protocol as requested by Devin Reed
(PR#78) and Steve Reeves (PR#85, PR#86):
For login shells (command line starts with '-'),
If $PATH doesn't start with ':' or contain a space,
change all ":" to " ".
source /etc/glogin
source $HOME/glogin
($HOME/gshrc is sourced afterward for both login and non-login).
In rehash built-in command, don't the print number of hashed
until all initialization is completed.
Restored commented-out PushVariablesGS at start of "shell" in
shell.asm to keep subshells from changing parent's environment.
Aug 4 98 [dmt] Fixed defects in wordmatch (edit.asm) related to
recognizing commands versus filenames during tab and ctrl-D
filename completion. Suppose there is a file "filename" in the
current directory and you enter one of the following:
command >& filen
command >filen
and press tab. Instead of getting filename completion, you
would get a beep. In the first case, gsh thought the "&"
was putting the command in the background and filen was the
beginning of a command name rather than a filename. In the
second, gsh included the ">" in the filename match pattern.
Aug 3 98 [dmt] Entabbed all the asm files (saved >36,000 bytes).
Aug 3 98 [dmt] Changes to this point checked-in to master archive.
Released as version 2.0d3
Aug 2 98 [dmt] Remove alloc256/free256 and associated data. Replace
with fixed 64-byte buffer for command filename (hash.asm)
and allocation of 261-byte buffer via ~NEW for shell
variable name (shellvar.asm).
Aug 1 98 [dmt] Updated and expanded mmdebug.asm routines that perform
error checking on memory management calls. Added macros ~NEW
and ~DISPOSE that invoke either the real or debug routines.
Fixed call to read $TERM variable's length (PR#81).
Replace call to allocate256 in AppendHome (shell.asm) with
code that allocates space for $HOME plus the string parameter.
Jul 28 98 [dmt] In expandvars (expand.asm), use echoFlag=0 (not 1)
for ReadLine. The characters are echoed as they are typed
and do not need to be reprinted on stdout.
Jul 27 98 [dmt] Added error checking to the various flavors of prefix:
- Verify 2nd parameter is a valid directory before setting.
- Verify 1st parameter < 32 before displaying or setting.
Jul 26 98 [dmt] Removed last of old shell calls and calls to and code for
p-string routines (p2cstr, c2pstr, c2pstr2, putp, errputp).
Removed old shell macros and "str" from gsh.mac. In removing
putp calls, found instances in pwd & prefix commands and prompt
handler where current directory name was assumed to be < 256
characters; recoded to use new routine getpfxstr.
Jul 21 98 [dmt] Changed invoke.asm to use RedirectGS instead of redirect.
Changed popd (in dir.asm) to get length of prefix 0 before
allocating its string, rather than assuming path is <= 256
characters. This allows directory stack to use very long names.
Jul 20 98 [dmt] Changed expand.asm to use InitWildcardGS and
NextWildcardGS instead of their obsolete counterparts.
Jul 20 98 [dmt] Changes up to this point checked-in to master archive.
Released as version 2.0d3
Jul 19 98 [dmt] Changed edit.asm to use ReadIndexedGS, InitWildcardGS,
NextWildcardGS, instead of their obsolete counterparts.
Jul 18 98 [dmt] Changed Set_Variable, Export, UnsetVariable in cmd.asm,
shellvar.asm, jobs.asm, and term.asm to use new shell interface
(SetGS, ExportGS, UnsetVariableGS).
In InitTerm (term.asm), do not set TERM to gnocon if it is
already set.
Jul 17 98 [dmt] Changed final Read_Variable call (in edit.asm) to use
getenv instead. Changed ReadVariableGS calls in hash.asm
and builtin.asm to also use getenv.
Jul 16 98 [dmt] Changed Read_Variable calls in history.asm and prompt.asm
to use getenv instead.
Jul 15 98 [dmt] Changed getenv (shellutil.asm) to use ReadVariableGS
instead of Read_Variable to get value. getenv's input parameter
is now a pointer to a GS/OS string (not a C-string), and it
returns a pointer to a GS/OS result buffer with a terminating
null byte added. This interface change affected calls to
getenv in orca.asm and term.asm.
Jul 14 98 [dmt] Changed expandvars (expand.asm) to use ReadVariableGS
to get the value of an environment variable, allowing values
over 256 characters in length.
Jul 13 98 [dmt] Rewrote shellvar.asm to use newer shell calls to access
environment variables, so that they can be > 256 characters.
Combined set and setenv into the same routine, with different
entry points.
Jul 12 98 [dmt] In rehash command (hash.asm), read the PATH environment
variable with ReadVariableGS instead of Read_Variable, allowing
detection of true length and total length > 256 (PR # 9).
Jul 9 98 [dmt] Removed the df command (from builtin.asm).
Defined macro incad to increment a 4-byte address, checking
for overflow; replaced instances of "inc ptr" with "incad ptr".
Jul 8 98 [dmt] Changed column offset table to use a 1-word rather
than 1-byte entry. This resolves PR#14 (hash wouldn't
print beyond first 256 filenames).
Jul 7 98 [dmt] Fixed defect in unalias (alias.asm) where the double
quote portion of the scanner would look for a terminating
single quote. This resolves PR#69.
Jul 5 98 [dmt] Changed default order for copying files in $PATH dirs
into executable list, so earlier paths files are found first.
Added environment variable flag $OLDPATHMODE to make gsh
behave in the old (backwards order) way when necessary.
Discard duplicate filenames when hashing.
Fix PR#73: directory in $PATH with escaped space (\ ) is
not searched. Needed to remove the "\" before sending
pathname to ExpandPathGS.
Jun 29 98 [dmt] Changes up to this point checked-in to master archive.
Released as version 2.0d2
Jun 28 98 [dmt] Added InitVar routine to shellvar.asm to read values
of all environment variables tracked in vardata.
Jun 25 98 [dmt] Added 2.0 versions of shell calls to gsh.mac (e.g.
ErrorGS, ReadVariableGS). Replaced old calls with new ones
for the following: ERROR to ErrorGS in builtin.asm, cmd.asm
dir.asm, shellvar.asm; Push[Pop]Variables to Push[Pop]VariabesGS
in invoke.asm, shellvar.asm, shell.asm; ReadVariable to
ReadVariableGS in builtin.asm and dir.asm.
Jun 23 98 [dmt] Made clear built-in a non-forked command.
Jun 21 98 [dmt] Added loop to execute(), in cmd.asm, to extract a single
command from the input line before sending it to command(). It
removes leading blanks and tabs and terminates the string at
the first ";" or "#". After command() has finished, execute()
loops again if the previous command was terminated with a ";".
This change fixed both problems in bug report #12:
a) All commands separated by ";" were evaluated before any
were executed, so the following wouldn't work:
set t_num=1 ; echo "Test number $t_num"
b) Odd things randomly happened when tab was the first
character of multiple consecutive lines.
Jun 20 98 [dmt] Changed pointer arithmetic from dec or inc to adc or sbc
to allow for boundary condition in shell.asm.
In ShellExec (cmd.asm), save status from call to execute and
pass back to caller in Accumulator.
Modify table of builtins so that source is unforked; this
fixes bug reports #7 and #8: prefix does not work from a
sourced file.
Jun 18 98 [dmt] In cmd.asm, modified system() to check for null pointer,
since that is documented in the ORCA/C manual as legal.
Jun 15 98 [dmt] Fixed bug report #3: when wildcards were expanded, if
nothing was found gsh printed "No match." and terminated, even
if there were more arguments to parse. Now gsh prints a message
"No match: <pattern> ignored" to stderr for each <pattern> that
does not match any filename. These changes were in expand.asm.
Changed mutual exclusion in cmd.asm and shellvar.asm to use
lock/unlock/key macros. That should be all of 'em.
Jun 14 98 [dmt] Fixed bug report #47: when ~ is parsed and next character
is a delimiter ("/" or ":") and first character of $HOME does
not match that delimiter, replace the delimiters in $HOME to
match the user's value. Changed three "ora addr" to "ora addr+2"
(alias.asm: ora ptr; edit.asm and history.asm: ora cdcap).
Changed mutual exclusion in expand.asm to use lock/unlock macros.
Jun 13 98 [dmt] Wrote script to test built-in commands; found many that
returned status=227. Updated exit, setdebug, ps, hash, commands,
history, dirs, pushd, popd, jobs, fg, bg, and stop to return
status of 0 (modified "return" to add "2:#0").
Jun 12 98 [dmt] Squeezed about 80 bytes out of orca.o (edit built-in),
mainly by removing "invalid path name" error msg, since I
couldn't force ExpandPath to report the error and the editor
handles it fine. Also tightened "whileloop" by using Y-reg
to index off of two pointers. Added lots of comments.
Jun 10 98 [dmt] The boolean shell environment variables (echo, pushdsilent,
etc.) would not work if they were set using UPPER CASE names.
Added routine cmpdcstr in shellutil.asm to downshift characters
while comparing two c strings, then called it from updatevars
in shellvar.asm to compare env variable names.
Jun 9 98 [dmt] Modified echo command (in builtin.asm) so it doesn't append
a blank to the end of everything it prints. Added comments to code.
Jun 8 98 [dmt] Added breakpoint option to setdebug (in builtin.asm) to
allow turning on conditional brk instructions for debugging.
Made "check4debug" a global word that reflects the current debug
state, and added "breakpoint" macro (in gsh.mac) to generate code.
Changed "2.0.4" to "2.0.6" within gnostr (in shell.asm).
Jun 6 98 [dmt] All the macros were extracted, compared, and collated in
alphabetical order into the file gsh.mac. Six macros used by
other macros had to be moved to the end of the file.
Added direct-page/stack data segment (size 2K) to main.asm.
It is initialized to be filled with "?" characters, so that
it can be examined to see how much space is being used.
Jun 5 98 [dmt] Determined that the current sources have only two
differences from the gsh distributed with GNO/2.0.4:
In main.asm between (argloop and cmd3) the code
ph4 #1024
jsl ~NEW
formerly was
pea 1024
jsl ~NEW
In jobs.asm (after dokill) the error check after
kill (pid,signum)
was not present.
Jun 1 98 [dmt] Changed to execvp to _execve in invoke.asm. gsh works!
24 Apr 98 [gdr] Fitted gsh sources into into GNO builds. While gsh
assembles and links (abeit using the v2.0.4 termcap library),
it does not currently run -- it just crashes. The changes
that were made includes:
- 'keep' lines were eliminated
- the 'mcopy' now takes the macro from the /obj/gno/bin/gsh
directory. This is in anticipation of having the macro
files generated from a single source file; there is a large
amount of duplication. For the moment, the makefile merely
copies the old macro files from the "M" directory to the
/obj/gno/bin/gsh directory.
- start each file with a dummy routine so that the source
code winds up in the *.o rather than the *.root file.
- added the 'setcom 60' directive; there were many source
lines that were otherwise getting truncated.
18 Nov 97 - [gdr] initial checkin into v2.0.6 repository. No changes
were made to the sources.
GSH 1.1 UPDATES
^^^^^^^^^^^^^^^
(unknown) - Removed two references to $E0C000 in shell.asm (signal
handlers). Bad Timmy!
2/25/92 d01 - fixed a problem with the command-line aborting after certain
built-ins are run.
4/03/92 d02 - .ttya and .ttyb are displayed as 'ta' and 'tb' respectively in
@ -43,7 +549,8 @@ GSH 1.1 UPDATES...
~2 if $home was /usr. Looked real dumb :) and was incorrect.
- optimizations to job control
d16 - echo flushes the stdio when finished.
6/24/92 - fixed bug in system() call vector..make should work better now :)
6/24/92 - fixed bug in system() call vector..make should work better
now :)
- added a newline after 'pwd'.
- wrote 'edit' built-in.
6/26/92 d17 - began work on stdin for gsh. Uses GS/OS, ioctl(), etc...
@ -106,7 +613,7 @@ GSH 1.1 UPDATES...
9/03/92 - fixed memory trashing problem in 'source'
9/04/92 - 'ps' only displays processes with the users uid. Be sure to
use login, or you'll be the kernel's uid and get to see all
of the kernel's processes as your own.
of the kernel's processes as your own.
9/10/92 - forgot to 'clc' when alias not found in 'alias foo'.
9/20/92 - fixed open-apple mapping
- changed keyboard mapping
@ -138,21 +645,22 @@ GSH 1.1 UPDATES...
this now.
02/17/93 b03 - gshrc is now read as '@:gshrc'
03/02/93 - 'set' automatically detects changing $term and auto-peforms a
tset. manually typing 'tset' is no longer required though it is
still included.
tset. manually typing 'tset' is no longer required though it is
still included.
- prompts can now contain \n,\r,\t,\b.
03/10/93 - updated automatic variable setting code. works faster now.
- optimized low-level string routines
03/25/93 - fixed NULL commands aborting entire command-lines.
04/04/93 - history commands can now be greater than 256 characters, though
when being read, they are clipped to 1024.
when being read, they are clipped to 1024.
- the history file location has been moved to '@:history'
- if $ignoreeof is set, then EOF (^D) will not quit the shell.
- %U and %u will start and end underlining in prompts.
04/22/93 b04 - 'df' displays device numbers
- gsh now takes commands as command-line input. ie.,
'gsh echo hello, world' will start gsh then gsh will run echo.
- fixed a nasty shell script bug that basically rendered it useless.
'gsh echo hello, world' will start gsh then gsh will run echo.
- fixed a nasty shell script bug that basically rendered it
useless.
- fixed memory trashing in shell scripts.
- fixed memory trashing in histories.
04/26/94 b05 - which no longers displays the command-name first.

View File

@ -6,15 +6,55 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: alias.asm,v 1.9 1999/02/08 17:26:49 tribby Exp $
*
**************************************************************************
*
* ALIAS.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
*
* alias subroutine (4:argv,2:argc)
* Returns with status=0 in Accumulator
*
* unalias subroutine (4:argv,2:argc)
* return 2:status
*
* initalias jsr/rts with no parameters
*
* expandalias subroutine (4:cmd)
* return 4:buf
*
* addalias subroutine (4:aliasname,4:aliasval)
* return
*
* removealias subroutine (4:aliasname)
* return
*
* findalias subroutine (4:aliasname),space
* return 4:value
*
* startalias jsl/rtl with no parameters
*
* nextalias subroutine (4:p)
* return 2:hashvalz
*
*
**************************************************************************
keep o/alias
mcopy m/alias.mac
mcopy /obj/gno/bin/gsh/alias.mac
dummyalias start ; ends up in root
end
setcom 60
VTABSIZE gequ 17
@ -29,6 +69,8 @@ VTABSIZE gequ 17
alias START
using AliasData
arg equ 1
space equ arg+4
argc equ space+3
@ -44,13 +86,17 @@ end equ argv+4
phd
tcd
lda argc
lock AliasMutex
lda argc How many arguments were provided?
dec a
beq showall
beq showall None -- show all alias names.
dec a
beq showone
jmp setalias
beq showone One -- show a single name.
jmp setalias More -- set an alias.
;
; Show all aliases
;
showall jsl startalias
showloop jsl nextalias
sta arg
@ -78,6 +124,9 @@ showloop jsl nextalias
noshow jmp exit
;
; Show a single alias
;
showone ldy #4+2
lda [argv],y
tax
@ -85,8 +134,8 @@ showone ldy #4+2
ldy #4
lda [argv],y
pha
jsr puts
lda #':'
jsr puts Print name.
lda #':' Print ": ".
jsr putchar
lda #' '
jsr putchar
@ -96,14 +145,18 @@ showone ldy #4+2
ora arg+2
beq notthere
lda arg
jsr puts
jsr newline
jmp exit
notthere ldx #^noalias
lda #noalias
jsr puts Print alias value.
jsr newline Print newline.
jmp exit All done.
notthere ldx #^noalias Print message:
lda #noalias 'Alias not defined'
jsr puts
jmp exit
;
; Set an alias name
;
setalias ldy #4+2 ;put alias name on stack
lda [argv],y
pha
@ -112,7 +165,7 @@ setalias ldy #4+2 ;put alias name on stack
pha
ph4 #2
jsl ~NEW
~NEW
sta arg
stx arg+2
lda #0
@ -120,9 +173,9 @@ setalias ldy #4+2 ;put alias name on stack
add2 argv,#8,argv
dec2 argc
dec2 argc
buildalias lda argc
buildalias lda argc
beq setit
pei (arg+2)
@ -134,7 +187,7 @@ buildalias lda argc
pha
lda [argv]
pha
jsr catcstr
jsr catcstr
stx arg+2
sta arg
jsl nullfree
@ -144,7 +197,7 @@ buildalias lda argc
pei (arg+2)
pei (arg)
ph4 #spacestr
jsr catcstr
jsr catcstr
stx arg+2
sta arg
jsl nullfree
@ -160,7 +213,8 @@ setit pei (arg+2)
pei (arg)
jsl nullfree
exit lda space
exit unlock AliasMutex
lda space
sta end-3
lda space+1
sta end-2
@ -170,7 +224,7 @@ exit lda space
adc #end-4
tcs
lda #0
lda #0 Return status always 0.
rtl
@ -190,16 +244,16 @@ spacestr dc c' ',h'00'
unalias START
space equ 1
argc equ space+3
argv equ argc+2
end equ argv+4
using AliasData
; subroutine (4:argv,2:argc),space
status equ 0
space equ status+2
tsc
phd
tcd
subroutine (4:argv,2:argc),space
lock AliasMutex
stz status
lda argc
dec a
@ -208,6 +262,7 @@ end equ argv+4
ldx #^Usage
lda #USage
jsr errputs
inc status Return status = 1.
bra done
loop add2 argv,#4,argv
@ -223,19 +278,8 @@ loop add2 argv,#4,argv
bra loop
done lda space
sta end-3
lda space+1
sta end-2
pld
tsc
clc
adc #end-4
tcs
lda #0
rtl
done unlock AliasMutex
return 2:status
Usage dc c'Usage: unalias name ...',h'0d00'
@ -251,9 +295,11 @@ initalias START
using AliasData
; Set all entries in AliasTable to 0
lda #0
ldy #VTABSIZE
tax #0
tax
yahaha sta AliasTable,x
inx2
sta AliasTable,x
@ -263,7 +309,7 @@ yahaha sta AliasTable,x
rts
END
END
;=========================================================================
;
@ -272,145 +318,213 @@ yahaha sta AliasTable,x
;=========================================================================
expandalias START
outbuf equ 0
sub equ outbuf+4
word equ sub+4
buf equ word+4
space equ buf+4
bufend equ buf+4
inquote equ bufend+2
bsflag equ inquote+2
space equ bsflag+2
subroutine (4:cmd),space
ph4 #1024
jsl ~NEW
ph4 maxline_size Allocate result buffer.
~NEW
stx buf+2
sta buf
stx outbuf+2
sta outbuf
jsl alloc1024
stx word+2
stx outbuf+2 Initialize "next
sta outbuf output char" pointer.
clc Calculate end of buffer-1;
adc maxline_size note: it's allocated to be in one
dec a bank, so only need low-order word.
sta bufend
jsl allocmaxline Allocate buffer for word that
stx word+2 might be an alias.
sta word
lda #0
sta [buf] ;In case we're called with empty string
sta [buf] In case we're called with empty string.
sta [word]
;
; eat leading spaces
; Eat leading space and tabs (just in case expanding a variable added them!)
;
bra eatleader
bump_cmd inc cmd
eatleader lda [cmd]
and #$FF
jeq done
jeq stringend
cmp #' '
bne getword
inc cmd
sta [outbuf]
inc outbuf
bra eatleader
beq bump_cmd
cmp #9
beq bump_cmd
;
; find the leading word
; Parse the leading word
;
getword short a
short a
ldy #0
bra makeword1 First time, already checked 0, ' ', 9
makeword lda [cmd],y
if2 @a,eq,#0,gotword
if2 @a,eq,#' ',gotword
if2 @a,eq,#';',gotword
if2 @a,eq,#9,gotword
makeword1 if2 @a,eq,#';',gotword
if2 @a,eq,#'&',gotword
if2 @a,eq,#'|',gotword
if2 @a,eq,#'>',gotword
if2 @a,eq,#'<',gotword
if2 @a,eq,#13,gotword
if2 @a,eq,#9,gotword
if2 @a,eq,#10,gotword
sta [word],y
iny
bra makeword
;
; we got a word, now check if it's an alias
; We have a word. See if it's an alias.
;
gotword lda #0
sta [word],y
long a
add2 @y,cmd,cmd
cpy #0 Check for 0 length.
beq copyrest
phy
pei (word+2)
pei (word)
jsl findalias
sta sub
stx sub+2
ply
ora sub+2
beq noalias
beq copyrest
;
; expand it, if you hadn't figured it out for yourself by now.
; Yes, this is an alias. Copy it into the output buffer.
;
pla
add2 @y,cmd,cmd Add length to cmd pointer.
pei (sub+2) Make sure that
pei (sub) substituted string
jsr cstrlen will fit into buffer.
sec
adc outbuf
jge overflow
cmp bufend
jge overflow
ldy #0
putalias lda [sub],y
and #$FF
beq next
sta [outbuf]
short a
lda [sub]
putalias sta [outbuf]
inc outbuf
iny
bra putalias
lda [sub],y
bne putalias
long a
;
; no alias, so just copy the original string
; That alias is expanded. Copy until we reach the next command.
;
noalias plx
beq next
ldy #0
noalias2 lda [word],y
copyrest stz inquote Clear the "in quotes" flag
stz bsflag and "backslashed" flag.
next anop
lda outbuf Check for output overflow.
cmp bufend
jcs overflow
lda [cmd] Transfer the character.
and #$00FF
cmp #13 If carriage-return,
bne go8bits
lda #0 treat like end-of-string.
go8bits short a
sta [outbuf]
long a
inc cmd Bump pointers.
inc outbuf
iny
dex
bne noalias2
if2 @a,eq,#0,done
;
; the alias is expanded, now copy until we reach the next command
; If that was a backslashed character, don't check for special chars.
;
next lda [cmd]
inc cmd
sta [outbuf]
inc outbuf
and #$FF
beq done
if2 @a,eq,#13,nextalias
ldx bsflag
beq testq
stz bsflag
bra next
testq if2 @a,eq,#"'",singquoter
if2 @a,eq,#'"',doubquoter
;
; Remaining characters aren't special if we are in a quoted string
;
ldx inquote
bne next
if2 @a,eq,#';',nextalias
if2 @a,eq,#'&',nextalias
if2 @a,eq,#'|',nextalias
if2 @a,eq,#'\',backstabber
if2 @a,eq,#"'",singquoter
if2 @a,eq,#'"',doubquoter
if2 @a,ne,#'\',next
;
; "\" found
;
backstabber sta bsflag
bra next
backstabber lda [cmd]
inc cmd
sta [outbuf]
inc outbuf
and #$FF
beq done
;
; "'" found
;
singquoter bit inquote Check "in quotes" flag.
bvs next In double quotes. Keep looking.
lda inquote Toggle single quote
eor #$8000
sta inquote
bra next
singquoter lda [cmd]
inc cmd
sta [outbuf]
inc outbuf
and #$FF
beq done
if2 @a,ne,#"'",singquoter
;
; '"' found
;
doubquoter bit inquote Check "in quotes" flag.
bmi next In single quotes. Keep looking.
lda inquote Toggle single quote
eor #$4000
sta inquote
bra next
doubquoter lda [cmd]
inc cmd
sta [outbuf]
inc outbuf
and #$FF
beq done
if2 @a,ne,#"'",singquoter
bra next
;
; ";", "|", or "&" found: it's another command
;
nextalias jmp eatleader
;
; Terminate string and exit
;
stringend short a
sta [outbuf]
long a
;
; All done: clean up and return to caller
;
done ldx word+2
lda word
jsl free1024
jsl freemaxline
return 4:buf
;
; Report overflow error
;
overflow anop
pei (buf+2) Free the output buffer.
pei (buf)
jsl nullfree
stz buf
stz buf+2
ldx #^ovferr Report overflow error.
lda #ovferr
jsr errputs
bra done
ovferr dc c'gsh: Alias overflowed line limit',h'0d00'
END
;=========================================================================
@ -420,7 +534,7 @@ done ldx word+2
;=========================================================================
addalias START
using AliasData
tmp equ 0
@ -442,7 +556,7 @@ space equ hashval+4
sta ptr+2
search lda ptr
ora ptr
ora ptr+2
beq notfound
ldy #4
lda [ptr],y
@ -471,12 +585,12 @@ replace ldy #8+2
pha
jsl nullfree
pei (aliasval+2)
pei (aliasval)
pei (aliasval)
jsr cstrlen
inc a
pea 0
pha
jsl ~NEW
~NEW
sta tmp
stx tmp+2
ldy #8
@ -489,10 +603,10 @@ replace ldy #8+2
pei (tmp+2)
pei (tmp)
jsr copycstr
bra done
jmp done
notfound ph4 #4*3
jsl ~NEW
~NEW
sta ptr
stx ptr+2
ldy #2
@ -502,12 +616,12 @@ notfound ph4 #4*3
lda AliasTable+2,x
sta [ptr],y
pei (aliasname+2)
pei (aliasname)
pei (aliasname)
jsr cstrlen
inc a
pea 0
pha
jsl ~NEW
~NEW
sta tmp
stx tmp+2
ldy #4
@ -521,12 +635,12 @@ notfound ph4 #4*3
pei (tmp)
jsr copycstr
pei (aliasval+2)
pei (aliasval)
pei (aliasval)
jsr cstrlen
inc a
pea 0
pha
jsl ~NEW
~NEW
sta tmp
stx tmp+2
ldy #8
@ -544,7 +658,7 @@ notfound ph4 #4*3
sta AliasTable,x
lda ptr+2
sta AliasTable+2,x
done return
END
@ -580,8 +694,8 @@ space equ ptr+4
adc #AliasTable
sta oldptr
searchloop ora2 ptr,ptr+2,@a
beq done
searchloop ora2 ptr,ptr+2,@a
beq done
ldy #4+2
lda [ptr],y
@ -624,7 +738,7 @@ foundit ldy #2
pei (ptr+2)
pei (ptr)
jsl nullfree
done return
END
@ -657,8 +771,8 @@ space equ value+4
lda AliasTable+2,x
sta ptr+2
searchloop ora2 ptr,ptr+2,@a
beq done
searchloop ora2 ptr,ptr+2,@a
beq done
ldy #4+2
lda [ptr],y
@ -753,34 +867,34 @@ done return 4:value
;
;=========================================================================
hashalias PRIVATE
hashalias PRIVATE
hashval equ 0
space equ hashval+2
hashval equ 0
space equ hashval+2
subroutine (4:p),space
subroutine (4:p),space
lda #11
sta hashval
lda #11
sta hashval
ldy #0
loop asl hashval
lda [p],y
and #$FF
beq done
clc
adc hashval
sta hashval
iny
bra loop
done UDivide (hashval,#VTABSIZE),(@a,@a)
ldy #0
loop asl hashval
lda [p],y
and #$FF
beq done
clc
adc hashval
sta hashval
iny
bra loop
done UDivide (hashval,#VTABSIZE),(@a,@a)
asl2 a ;Make it an index.
sta hashval
asl2 a ;Make it an index.
sta hashval
return 2:hashval
return 2:hashval
END
END
;=========================================================================
;
@ -792,7 +906,8 @@ AliasData DATA
AliasNum dc i2'0'
AliasPtr dc i4'0'
AliasMutex key
AliasTable ds VTABSIZE*4
AliasTable ds VTABSIZE*4
END
END

View File

@ -6,134 +6,95 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: bufpool.asm,v 1.7 1999/02/08 17:26:50 tribby Exp $
*
**************************************************************************
*
* BUFPOOL
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* This is the buffer pool
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
* The alloc routine is a jsl without any stack params.
* Pointer to requested buffer is returned in X/A registers.
* allocmaxline
* The free routine takes the address from the X/A registers
* freemaxline
*
* bufpool data:
* pmaxline dc i4'0'
* pmaxlinemutex key
*
**************************************************************************
keep o/bufpool
mcopy m/bufpool.mac
mcopy /obj/gno/bin/gsh/bufpool.mac
dummybufpool start ; ends up in .root
end
setcom 60
**************************************************************************
*
* get a buffer of size 256
* Get a buffer of size maxline_size
*
**************************************************************************
alloc256 START
using bufpool
lock pool256mutex
lda pool256
ora pool256+2
beq allocbuf
phd
ph4 pool256
tsc
tcd
lda [1]
sta pool256
ldy #2
lda [1],y
sta pool256+2
unlock pool256mutex
pla
plx
pld
rtl
allocbuf unlock pool256mutex
ph4 #256
jsl ~NEW
rtl
allocmaxline START
END
**************************************************************************
*
* free a buffer of size 256
*
**************************************************************************
free256 START
using bufpool
phd
phx
pha
tsc
tcd
lock pool256mutex
lda pool256
sta [1]
ldy #2
lda pool256+2
sta [1],y
lda 1
sta pool256
lda 3
sta pool256+2
unlock pool256mutex
pla
plx
pld
rtl
END
**************************************************************************
*
* get a buffer of size 1024
*
**************************************************************************
alloc1024 START
using bufpool
lock pool1024mutex
lock pmaxlinemutex
lda pool1024
ora pool1024+2
lda pmaxline If pool pointer
ora pmaxline+2 isn't NULL,
beq allocbuf
phd
ph4 pool1024
ph4 pmaxline Push pool pointer on stack.
tsc
tcd
lda [1]
sta pool1024
lda [1] Replace pool pointer with
sta pmaxline the address it points to.
ldy #2
lda [1],y
sta pool1024+2
unlock pool1024mutex
pla
sta pmaxline+2
unlock pmaxlinemutex
pla
plx
pld
rtl Return to caller.
;
; No memory in free pool; must allocate a new block.
;
allocbuf unlock pmaxlinemutex
ph4 maxline_size
~NEW
rtl
allocbuf unlock pool1024mutex
ph4 #1024
jsl ~NEW
rtl
;
; Constant indicating # of bytes in a maxline buffer
;
maxline_size entry Make this easily seen.
dc i4'4096'
END
**************************************************************************
*
* free a buffer of size 1024
* Free a buffer of size maxline_size, putting it into the free pool
*
**************************************************************************
free1024 START
freemaxline START
using bufpool
@ -142,35 +103,34 @@ free1024 START
pha
tsc
tcd
lock pool1024mutex
lda pool1024
sta [1]
lock pmaxlinemutex
lda pmaxline Move current head of pool list
sta [1] into the buffer being freed.
ldy #2
lda pool1024+2
lda pmaxline+2
sta [1],y
lda 1
sta pool1024
lda 1 Put address of buffer being freed
sta pmaxline into the pool list head.
lda 3
sta pool1024+2
unlock pool1024mutex
sta pmaxline+2
unlock pmaxlinemutex
pla
plx
pld
rtl
rtl Return to caller.
END
**************************************************************************
*
* buffer pool data
* Buffer pool data
*
**************************************************************************
bufpool DATA
pool256 dc i4'0'
pool256mutex key
pool1024 dc i4'0'
pool1024mutex key
pmaxline dc i4'0' Head of free pool list.
pmaxlinemutex key Mutual exclusion when modifying list.
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,20 +6,47 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: dir.asm,v 1.9 1998/12/31 18:29:12 tribby Exp $
*
**************************************************************************
*
* DIR.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* Directory stack management
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
*
* InitDStack
*
* dirs built-in command
*
* pushd built-in command
*
* popd built-in command
*
* path2tilde
*
* getpfxstr
*
**************************************************************************
keep o/dir
mcopy m/dir.mac
mcopy /obj/gno/bin/gsh/dir.mac
dummydir start ; ends up in .root
end
setcom 60
MAXD gequ 50
**************************************************************************
*
* Initialize directory stack
@ -36,7 +63,7 @@ InitDStack START
rts
END
END
**************************************************************************
*
@ -52,15 +79,20 @@ dirs START
using DirData
arg equ 0
space equ arg+4
status equ arg+4
space equ status+2
subroutine (4:argv,2:argc),space
lock DirMutex
stz status
lda argc
dec a
beq showshort
dec a
bne using
ldy #4
lda [argv],y
sta arg
@ -79,18 +111,20 @@ space equ arg+4
using ldx #^usingstr
lda #usingstr
jsr errputs
inc status Return status = 1.
bra exit
showlong jsl dotods
showlong jsl dotods Set top of stack to current directory.
pea 0
jsl showdir
bra exit
showshort jsl dotods
showshort jsl dotods Set top of stack to current directory.
pea 1
jsl showdir
exit return
exit unlock DirMutex
return 2:status
usingstr dc c'usage: dirs [-l]',h'0d00'
@ -113,50 +147,59 @@ pushd START
count equ 0
p equ count+2
arg equ p+4
space equ arg+4
status equ arg+4
space equ status+2
subroutine (4:argv,2:argc),space
lda argc
dec a
beq xchange
dec a
bne usage
lock DirMutex
stz status
lda argc Get number of arguments.
dec a If no parameters,
beq xchange exchange top two dirs on stack.
dec a If > 1 parameter,
bne usage print usage string.
ldy #4
lda [argv],y
sta arg
ldy #4 Move parameter pointer from
lda [argv],y argv array to direct
sta arg page variable "arg".
ldy #6
lda [argv],y
sta arg+2
lda [arg]
and #$FF
cmp #'+'
beq rotate
jmp godir
lda [arg] If first character
and #$FF of parameter is
cmp #'+' "+",
beq rotate do the rotate;
jmp godir else push the directory.
;
; More than one parameter provided; print usage string and exit.
;
usage ldx #^usagestr
lda #usagestr
jsr errputs
jmp exit
jmp prerrmsg
xchange lda tods
bne xgoodie
ldx #^err1
lda #err1
jsr errputs
jmp exit
xgoodie jsl dotods
;
; Either no parameter or "+" provided; exchange directory stack entries.
;
xchange lda tods Get index to top of dir stack.
bne xgoodie If 0,
ldx #^err1 print error message
lda #err1 "No other directory"
jmp prerrmsg
xgoodie jsl dotods Set top of stack to current directory.
lda tods
dec a
asl a
asl a
tax
tax X = offset to tos-1.
lda tods
asl a
asl a
tay
lda dirstack,x
tay Y = offset to tos.
lda dirstack,x Swap tos-1 and tos.
pha
lda dirstack,y
sta dirstack,x
@ -168,29 +211,36 @@ xgoodie jsl dotods
sta dirstack+2,x
pla
sta dirstack+2,y
jmp gototop
jmp gototop chdir to the new tos.
;
; Parameter = +n; do the rotate
;
rotate add4 arg,#1,p
pei (p+2)
pei (p)
jsr cstrlen
tax
Dec2Int (p,@x,#0),@a
sta count
cmp #0
beq godir
lda tods
beq roterr
lda count
cmp tods
Dec2Int (p,@x,#0),@a Convert parameter to decimal
sta count and store in count.
cmp #0 If parameter is 0
beq badnum or negative,
bmi badnum report "invalid number".
cmp tods If count >= tos,
beq rotloop
bcc rotloop
roterr ldx #^err2
lda #err2
jsr errputs
jmp exit
roterr ldx #^err2 Print error message:
lda #err2 Directory stack not that deep
jmp prerrmsg
badnum ldx #^errbadnum Print error message:
lda #errbadnum Invalid number
jmp prerrmsg
;
; Loop to rotate entries in directory stack
;
rotloop lda tods
dec a
asl a
@ -217,25 +267,9 @@ nextrot pla
sta dirstack+2
dec count
bne rotloop
bra gototop
godir jsl dotods
pei (arg+2)
pei (arg)
jsl gotodir
bne exit
inc tods
lda tods
asl a
asl a
tay
lda #0
sta dirstack,y
sta dirstack+2,y
jsl dotods
bra done
;
; chdir to the top-of-stack directory
;
gototop lda tods
asl a
asl a
@ -245,17 +279,52 @@ gototop lda tods
lda dirstack,y
pha
jsl gotodir
bra done All done.
done lda varpushdsil
;
; Parameter = directory name; add it to the stack
;
godir anop
lda tods
cmp #MAXD-1 If index >= maximum,
bcc stackok
ldx #^errfull print error message.
lda #errfull
prerrmsg jsr errputs
inc status Return status = 1.
bra exit
stackok anop
jsl dotods Set top of stack to current directory.
pei (arg+2)
pei (arg)
jsl gotodir chdir to the parameter directory.
bne exit
inc tods Bump the top of stack pointer.
lda tods
asl a
asl a
tay
lda #0
sta dirstack,y
sta dirstack+2,y
jsl dotods Set top of stack to current directory.
done lda varpushdsil If $PUSHDSILENT not defined,
bne exit
pea 1
jsl showdir
jsl showdir show the directory stack.
exit return
exit unlock DirMutex
return 2:status
usagestr dc c'usage: pushd [+n | dir]',h'0d00'
err1 dc c'pushd: No other directory',h'0d00'
err2 dc c'pushd: Directory stack not that deep',h'0d00'
errfull dc c'pushd: Directory stack full',h'0d00'
errbadnum dc c'pushd: Invalid number',h'0d00'
END
@ -275,10 +344,13 @@ popd START
count equ 0
arg equ count+2
space equ arg+4
status equ arg+4
space equ status+2
subroutine (4:argv,2:argc),space
lock DirMutex
stz status
lda argc
dec a
jeq noarg
@ -298,6 +370,7 @@ space equ arg+4
using ldx #^usingstr
lda #usingstr
jsr errputs
inc status Return status = 1.
jmp exit
plus add4 arg,#1,arg
@ -319,9 +392,10 @@ plus add4 arg,#1,arg
pluserr ldx #^err2
lda #err2
jsr errputs
inc status Return status = 1.
bra exit
doplus jsl dotods
doplus jsl dotods Set top of stack to current directory.
sub2 tods,count,@a
asl a
asl a
@ -350,6 +424,7 @@ noarg lda tods
ldx #^err1
lda #err1
jsr errputs
inc status Return status = 1.
bra exit
noarg0 lda tods
@ -379,7 +454,8 @@ gototop lda tods
pea 1
jsl showdir
exit return
exit unlock DirMutex
return 2:status
usingstr dc c'Usage: popd [+n]',h'0d00'
err1 dc c'popd: Directory stack empty',h'0d00'
@ -402,7 +478,7 @@ space equ retval+2
stz retval
pei (dir+2)
pei (dir+2)
pei (dir)
jsr c2gsstr
sta PRecPath
@ -414,8 +490,8 @@ space equ retval+2
GetFileInfo GRec
bcc ok
ohshit sta Err
Error Err
ohshit sta ErrError
ErrorGS Err
inc retval
bra done
@ -441,20 +517,25 @@ done ph4 PRecPath
mutex key
PRec dc i'2'
PRecNum dc i'0'
PRecPath ds 4
; Parameter block for GS/OS SetPrefix call
PRec dc i'2' pCount
PRecNum dc i'0' prefixNum (0 = current directory)
PRecPath ds 4 Pointer to input prefix path
GRec dc i'3'
GRecPath ds 4
GRecAcc ds 2
GRecFT ds 2
; Parameter block for GS/OS GetFileInfo call
GRec dc i'3' pCount
GRecPath ds 4 Pointer to input pathname
GRecAcc ds 2 access (result)
GRecFT ds 2 fileType (result)
; Parameter block for shell ErrorGS call (p 393 in ORCA/M manual)
Err dc i2'1' pCount
ErrError ds 2 Error number
Err ds 2
dirErr dc c': Not a directory',h'0d00'
END
**************************************************************************
*
* Display the directory stack
@ -470,35 +551,39 @@ space equ idx+2
subroutine (2:flag),space
lda tods
asl a
asl a
lda tods Get directory stack index.
asl a Multiply by four to
asl a get byte offset (idx).
sta idx
loop lda flag
loop lda flag If parameter == 1,
beq long
ldy idx
lda dirstack+2,y
lda dirstack+2,y print entry
pha
lda dirstack,y
pha
jsl path2tilde
phx
jsl path2tilde but first substitute "~"
phx for home directory.
pha
jsr puts
jsl nullfree
bra next
long ldy idx
lda dirstack+2,y
bra next
long ldy idx else,
lda dirstack+2,y print full entry.
tax
lda dirstack,y
jsr puts
next lda #' '
next lda #' ' Print a space.
jsr putchar
lda idx
lda idx If idx != 0,
beq done
sub2 idx,#4,idx
bra loop
sub2 idx,#4,idx idx = idx -4
bra loop handle next entry.
done jsr newline
@ -522,60 +607,62 @@ space equ idx+2
subroutine (0:dummy),space
lda tods
asl a
asl a
sta idx
tay
lda dirstack,y
ora dirstack+2,y
lda tods Get index number.
asl a Multiply index by four
asl a to get byte offset.
sta idx Store in idx
tay and Y-register.
lda dirstack,y If there is an address
ora dirstack+2,y in this position,
beq setit
lda dirstack+2,y
pha
lda dirstack,y
pha
jsl nullfree
jsl nullfree free it.
setit lock mutex
jsl alloc256
sta gppath
stx gppath+2
sta p
stx P+2
lda #254
sta [p]
GetPrefix gpparm
ldy #2
lda [p],y
xba
sta [p],y
add4 p,#3,p
pei (p+2)
pei (p)
jsr p2cstr
setit pea 0
jsl getpfxstr Get value of prefix 0.
sta p
stx p+2
ldx gppath+2
lda gppath
jsl free256
unlock mutex
ora p+2 If NULL pointer returned,
beq done an error was reported.
ldy idx
lda p
sta dirstack,y
ldy #2 If length of returned
lda [p],y GS/OS string is 0,
bne ok an error was reported.
ph4 p Free the buffer.
jsl nullfree
bra done
;
; Move text in GS/OS result buffer to beginning of buffer
; (overwritting the two length words).
;
ok clc Source is result
lda p buffer plus
adc #4 four bytes.
tay
lda p+2
adc #0
pha
phy
pei (p+2) Destination is first
pei (p) byte of buffer.
jsr copycstr
ldy idx Store address of string
lda p in current position
sta dirstack,y of directory stack.
lda p+2
sta dirstack+2,y
return
done return
mutex key
gpparm dc i2'2'
dc i2'0'
gppath dc i4'0'
END
**************************************************************************
@ -588,6 +675,7 @@ DirData DATA
dirstack ds MAXD*4
tods dc i'0'
DirMutex key
END
@ -598,7 +686,7 @@ tods dc i'0'
**************************************************************************
path2tilde START
ptr equ 0
newpath equ ptr+4
home equ newpath+4
@ -606,92 +694,215 @@ space equ home+4
subroutine (4:path),space
pei (path+2)
pei (path)
jsr cstrlen
inc2 a
pea 0
pei (path+2) Get length of
pei (path) path string
jsr cstrlen parameter.
inc2 a Add 2, and allocate
pea 0 memory for result string.
pha
jsl ~NEW
~NEW
sta newpath
stx newpath+2
sta ptr
stx ptr+2
jsl alloc256
ph4 #homename Get $HOME environment variable.
jsl getenv
sta home
stx home+2
sta varparm+4
stx varparm+6
Read_Variable varparm
ora home+2 If buffer wasn't allocated
jeq notfound2 cannot search for $HOME.
ldy #0
lda [home]
and #$FF
beq copyrest
tax
checkhome lda [path],y
and #$FF
beq notfound2
jsr tolower
jsr toslash
pha
iny
ldy #2 Get result length word.
lda [home],y
and #$FF
jsr tolower
jsr toslash
cmp 1,s
bne notfound
pla
dex
bne checkhome
cmp #'/'
beq notfound2 If 0, just copy the rest.
tax Use X to count down HOME chars.
ldy #0 path index is based from 0.
checkhome lda [path],y
and #$FF Isolate character in parameter,
beq notfound2 checking for end of string,
jsr tolower converting to lower-case
jsr toslash and changing ":" to "/".
pha Hold on stack for comparison.
iny4 $home has 4 bytes of length info
lda [home],y that need to be indexed over.
dey2 Take back 3 of the offset,
dey nudging Y ahead by 1.
and #$FF Isolate $home character,
jsr tolower converting to lower-case
jsr toslash and changing ":" to "/".
cmp 1,s If the parameter character !=,
bne notfound there is no match.
pla Pop the parameter character off stack.
dex Decrement $home length counter.
bne checkhome If more, stay in loop.
;
; First part of parameter matched $HOME
;
cmp #'/' This char = "/"?
beq found yes -- it's a match.
lda [path],y If the following character
and #$FF is zero (end of string),
beq found
lda [path],y
and #$FF
beq found
jsr toslash
jsr toslash '/', or ':', we have a match.
cmp #'/'
bne notfound2
found lda #'~'
sta [ptr]
inc ptr
bra copyrest
found lda #'~' Store '~' as first character
sta [ptr] in result buffer, and bump
incad ptr result pointer.
bra copyrest
notfound pla
notfound2 ldy #0
;
; First part of parameter does not match $HOME
;
notfound pla Get rid of comparison value on stack.
notfound2 ldy #0 Not found: copy from beginning.
;
; Copy remainder of parameter (Y-reg marks start) to destination string
;
copyrest short a
copyloop lda [path],y
beq endcopy
cmp #':'
bne copyput
lda #'/'
copyput sta [ptr]
copyput sta [ptr]
long a
inc ptr
incad ptr
short a
iny
bra copyloop
endcopy sta [ptr]
long a
dec ptr
lda [ptr]
dec ptr If final character
lda [ptr] was "/",
cmp #'/'
bne skipshorten
lda #0
lda #0 obliterate it.
sta [ptr]
skipshorten ldx home+2
lda home
jsl free256
skipshorten pei (home+2) Free memory allocated
pei (home) for the value of $HOME.
jsl nullfree
return 4:newpath
varparm dc i4'homename'
ds 4
homename str 'home'
homename gsstr 'home' Env variable name
END
**************************************************************************
*
* Return pointer to current directory (\0) GS/OS string in a/x
*
**************************************************************************
getpfxstr START
p equ 0
space equ p+4
subroutine (2:pnum),space
lock mutex
; Use dummy GS/OS result buf to get length of pathname
;
lda pnum Put prefix num into
cmp #$FFFF If it's $FFFF,
beq doboot use GetBootVol, not GetPrefix.
sta gpnum Store prefix num in parameter block.
ld4 TempResultBuf,gppath
GetPrefix gpparm
bra chklen
doboot ld4 TempResultBuf,gbpath
GetBootVol gbparm
chklen lda TempRBlen Use that length
clc plus five (for
adc #5 len words and terminator)
pea 0 to allocate memory
pha that holds the string.
~NEW
sta p Store result in
stx p+2 direct page pointer.
ora p+2 If memory was not available,
bne memok
lda #0201 report memory error and
bra rpterr return NULL to user.
memok lda TempRBlen Store result buf
inc2 a length at start
inc2 a of buffer.
sta [p]
tay Store a null byte
short a at the end of the
lda #0 string so it can
sta [p],y be used as a c-string.
long a
;
; Get the prefix string into the newly allocated buffer.
;
lda pnum Prefix number tells
cmp #$FFFF whether to use
beq doboot2 GetPrefix or GetBootVol.
mv4 p,gppath
GetPrefix gpparm
bcs rpterr
bra done
doboot2 mv4 p,gbpath
GetBootVol gbparm
bcc done If there was an error,
rpterr sta errError Save the value
ErrorGS err and report it.
ldy #2 Set length of returned
lda #0 string to 0 so caller
sta [p],y can detect error condition.
done unlock mutex
;
; Return pointer to caller. (Caller has responsibility to deallocate.)
;
return 4:p
mutex key
;
; Parameter block for GetPrefix GS/OS call
;
gpparm dc i2'2' pCount
gpnum dc i2'0' prefixNum (from parameter)
gppath dc i4'0' prefix returned to this GS/OS buffer.
;
; Parameter block for GetBootVol GS/OS call
;
gbparm dc i2'1' pCount
gbpath dc i4'0' prefix returned to this GS/OS buffer.
;
; GS/OS result buffer for getting the full length of the prefix string
;
TempResultBuf dc i2'5' Only five bytes total.
TempRBlen ds 2 String's length returned here.
ds 1 Only 1 byte for value.
;
; Parameter block for shell ErrorGS call (p 393 in ORCA/M manual)
;
err dc i2'1' pCount
errError ds 2 Error number
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

9
bin/gsh/gsh.desc Normal file
View File

@ -0,0 +1,9 @@
Name: gsh
Version: 2.0 (14 January 1999)
Shell: GNO
Author: Tim Meekins; updated by Dave Tribby
Contact: tribby@cup.hp.com
Where: /bin
FTP: ftp.gno.org
The GNO Shell.

1986
bin/gsh/gsh.mac Normal file

File diff suppressed because it is too large Load Diff

35
bin/gsh/gsh.rez Normal file
View File

@ -0,0 +1,35 @@
/*
* Resources for version and comment
*
* $Id: gsh.rez,v 1.13 1999/11/30 17:53:27 tribby Exp $
*/
#define PROG "gsh"
#define DESC "GNO/Shell\n"
#include "Types.rez"
#include "builddate.rez"
/*
* Version
*/
resource rVersion (1, purgeable3) {
{ 2, 0, 0, /* Version 2.0.0 */
alpha, /* development|alpha|beta|final|release */
1 }, /* non-final release number */
verUS, /* Country */
PROG, /* Program name */
DESC
BUILD_DATE
};
/*
* Comment
*/
resource rComment (1, purgeable3) {
PROG " v2.0\n"
DESC
"Written by Tim Meekins. Updated by Dave Tribby\n"
BUILD_DATE
};

File diff suppressed because it is too large Load Diff

View File

@ -6,10 +6,13 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: history.asm,v 1.8 1999/02/08 17:26:50 tribby Exp $
*
**************************************************************************
*
* HISTORY.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* Routines for dealing with history buffers.
*
@ -20,15 +23,42 @@
* Where historyRec is:
*
* [+0] NextHistory: pointer to historyRec
* [+4] HistoryCmd: string of characters
* [+4] HistoryCmd: string of characters
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
*
* InsertHistory
*
* PrevHistory
*
* NextHistory
*
* SaveHistory
*
* ReadHistory
*
* InitHistory
*
* PrintHistory
*
**************************************************************************
keep o/history
mcopy m/history.mac
mcopy /obj/gno/bin/gsh/history.mac
histNext gequ 0
histCmd gequ 4
dummyhistory start ; ends up in .root
end
setcom 60
histNext gequ 0
histCmd gequ 4
cmdbuflen gequ 1024
;=========================================================================
;
@ -36,41 +66,42 @@ histCmd gequ 4
;
;=========================================================================
InsertHistory START
using HistoryData
using global
InsertHistory START
using HistoryData
using global
ptr2 equ 0
ptr equ ptr2+4
len equ ptr+4
space equ len+2
histvalptr equ len+2
space equ histvalptr+4
subroutine (4:cmd),space
pei (cmd+2)
pei (cmd)
jsr cstrlen
sta len
pea 0
sta len
pea 0
clc
adc #4+1
pha
jsl ~NEW
sta ptr
stx ptr+2
ora ptr+2
beq putdone
pha
~NEW
sta ptr
stx ptr+2
ora ptr+2
beq putdone
inc lasthist
inc numhist
inc lasthist
inc numhist
lda historyptr ;Set up linked list pointers
sta [ptr]
ldy #histNext+2
lda historyptr+2
sta [ptr],y
mv4 ptr,historyptr
lda historyptr ;Set up linked list pointers
sta [ptr]
ldy #histNext+2
lda historyptr+2
sta [ptr],y
mv4 ptr,historyptr
pei (cmd+2)
pei (cmd)
@ -85,67 +116,90 @@ space equ len+2
;
putdone anop
Read_Variable RVParm
lda buffer
and #$FF
beq alldone
Dec2Int (#buffer+1,@a,#0),@a
sta size
beq alldone
;
; Get value of $HISTORY environment variable
;
ph4 #historyStr
jsl getenv
sta histvalptr Save pointer to GS/OS result buffer.
stx histvalptr+2
ora histvalptr+2 If buffer wasn't allocated,
jeq goback all done.
;
; Call Dec2Int to convert value of string into an integer
;
pha Reserve room on stack for result.
lda histvalptr Get pointer to $HISTORY value.
ldx histvalptr+2
clc Add 4 to address to skip
adc #4 over length words.
bcc pushaddr
inx
pushaddr phx Push address onto stack.
pha
ldy #2
lda [histvalptr],y
pha Push length.
pea 0 Push signedFlag = 0 (unsigned)
Tool $280b Dec2Int.
pla Get result.
sta size
beq alldone
;
; Follow linked list until we reach size histories
;
mv4 historyptr,ptr
ldy #histNext+2
follow lda [ptr]
tax
ora [ptr],y
beq alldone ;not enough
dec size
beq prune
lda [ptr],y
sta ptr+2
stx ptr
bra follow
mv4 historyptr,ptr
ldy #histNext+2
follow lda [ptr]
tax
ora [ptr],y
beq alldone ;not enough
dec size
beq prune
lda [ptr],y
sta ptr+2
stx ptr
bra follow
;
; we have enough, start pruning
;
prune lda [ptr]
sta ptr2
lda [ptr],y
sta ptr2+2
lda #0
sta [ptr]
sta [ptr],y ;terminate last history
prune lda [ptr]
sta ptr2
lda [ptr],y
sta ptr2+2
lda #0
sta [ptr]
sta [ptr],y ;terminate last history
;
; Dispose remaining
;
dispose lda ptr2
dispose lda ptr2
ora ptr2+2
beq alldone
dec numhist
lda [ptr2]
sta ptr
lda [ptr2],y
sta ptr+2
pei (ptr2+2)
pei (ptr2)
jsl nullfree
lda ptr
sta ptr2
lda ptr+2
sta ptr2+2
ldy #histNext+2
bra dispose
lda [ptr2]
sta ptr
lda [ptr2],y
sta ptr+2
pei (ptr2+2)
pei (ptr2)
jsl nullfree
lda ptr
sta ptr2
lda ptr+2
sta ptr2+2
ldy #histNext+2
bra dispose
alldone return
alldone pei (histvalptr+2)
pei (histvalptr)
jsl nullfree
RVParm dc a4'historyStr'
dc a4'buffer'
goback return
size ds 2
size ds 2
END
END
;=========================================================================
;
@ -154,23 +208,23 @@ size ds 2
;
;=========================================================================
PrevHistory START
PrevHistory START
using HistoryData
using global
using HistoryData
using global
using termdata
ora2 historyptr,historyptr+2,@a ;If no history, then skip
jeq ctl5a
ora2 historyptr,historyptr+2,@a ;If no history, then skip
jeq ctl5a
ldx cmdloc ;Move cursor to beginning of line
ldx cmdloc ;Move cursor to beginning of line
jsr moveleft
lda cdcap
ora cdcap
beq ctl5b0
tputs (cdcap,#0,#outc)
bra ctl5g
bra ctl5g
ctl5b0 ldx cmdlen ;clear line
ctl5b dex
@ -183,47 +237,47 @@ ctl5b dex
ctl5c ldx cmdlen
jsr moveleft
ctl5g ora2 currenthist,currenthist+2,@a
bne ctl5i ;If not set up for current hist then
lda historyptr+2 ;Set up at start.
ldx historyptr
ldy #2
bra ctl5j
ctl5g ora2 currenthist,currenthist+2,@a
bne ctl5i ;If not set up for current hist then
lda historyptr+2 ;Set up at start.
ldx historyptr
ldy #2
bra ctl5j
ctl5i mv4 currenthist,0 ;Otherwise move to previous history
stz cmdlen
stz cmdloc
ldy #HistNext+2
lda [0]
tax
lda [0],y
ctl5i mv4 currenthist,0 ;Otherwise move to previous history
stz cmdlen
stz cmdloc
ldy #HistNext+2
lda [0]
tax
lda [0],y
ctl5j sta 0+2 ;Save some pointers
stx 0
sta currenthist+2
stx currenthist
ora 0 ;If ptr is 0 then at end, quit
beq ctl5a
ctl5j sta 0+2 ;Save some pointers
stx 0
sta currenthist+2
stx currenthist
ora 0 ;If ptr is 0 then at end, quit
beq ctl5a
ldx #0 ;Display and store command
iny2
ctl5h lda [0],y
ldx #0 ;Display and store command
iny2
ctl5h lda [0],y
and #$FF
sta cmdline,x
sta cmdline,x
beq ctl5ha
inx
iny
bra ctl5h
ctl5ha stx cmdlen
inx
iny
bra ctl5h
ctl5ha stx cmdlen
stx cmdloc
ldx #^cmdline
lda #cmdline
jsr puts
ctl5a rts
ctl5a rts
END
END
;=========================================================================
;
@ -232,37 +286,37 @@ ctl5a rts
;
;=========================================================================
NextHistory START
NextHistory START
using HistoryData
using global
using HistoryData
using global
using termdata
ora2 historyptr,historyptr+2,@a ;No hist, then skip
jeq ctl6a
ora2 historyptr,historyptr+2,@a ;No hist, then skip
jeq ctl6a
stz 4 ;Walk through linked list searching
stz 4+2 ; for hist prior to last hist.
mv4 historyptr,0
ctl6i if2 0,ne,currenthist,ctl6j
if2 0+2,eq,currenthist+2,ctl6k
ctl6j mv4 0,4
ldy #HistNext+2
lda [0]
tax
lda [0],y
sta 0+2
stx 0
bra ctl6i
stz 4 ;Walk through linked list searching
stz 4+2 ; for hist prior to last hist.
mv4 historyptr,0
ctl6i if2 0,ne,currenthist,ctl6j
if2 0+2,eq,currenthist+2,ctl6k
ctl6j mv4 0,4
ldy #HistNext+2
lda [0]
tax
lda [0],y
sta 0+2
stx 0
bra ctl6i
ctl6k ldx cmdloc ;Move cursor to left
ctl6k ldx cmdloc ;Move cursor to left
jsr moveleft
lda cdcap
ora cdcap
beq ctl6b0
tputs (cdcap,#0,#outc)
bra ctl6g
bra ctl6g
ctl6b0 ldx cmdlen ;clear line
ctl6b dex
@ -275,21 +329,21 @@ ctl6b dex
ctl6c ldx cmdlen
jsr moveleft
ctl6g stz cmdlen ;Get hist info.
stz cmdloc
mv4 4,currenthist
ora2 4,4+2,@a
beq ctl6a ;Whoops, back to end, quit
ctl6g stz cmdlen ;Get hist info.
stz cmdloc
mv4 4,currenthist
ora2 4,4+2,@a
beq ctl6a ;Whoops, back to end, quit
ldx #0 ;Output the new command
ldy #4
ctl6h lda [4],y
ldx #0 ;Output the new command
ldy #4
ctl6h lda [4],y
and #$ff
sta cmdline,x
sta cmdline,x
beq ctl6ha
iny
inx
bra ctl6h
iny
inx
bra ctl6h
ctl6ha stx cmdlen
stx cmdloc
@ -297,9 +351,9 @@ ctl6ha stx cmdlen
lda #cmdline
jsr puts
ctl6a rts
ctl6a rts
END
END
;=========================================================================
;
@ -307,10 +361,15 @@ ctl6a rts
;
;=========================================================================
SaveHistory START
SaveHistory START
using HistoryData
using global
using HistoryData
using global
svhisvalptr equ 0
space equ svhisvalptr+4
subroutine ,space
lda historyFN
sta DestroyParm+2
@ -320,39 +379,60 @@ SaveHistory START
sta DestroyParm+4
sta CreateParm+4
sta OpenParm+6
Read_Variable RVParm
lda buffer
and #$FF
jeq done
Dec2Int (#buffer+1,@a,#0),size
lda size
jeq done
;
; Get value of $SAVEHISTORY environment variable
;
ph4 #savehistStr
jsl getenv
sta svhisvalptr Save pointer to GS/OS result buffer.
stx svhisvalptr+2
ora svhisvalptr+2 If buffer wasn't allocated,
jeq goback all done.
;
; Call Dec2Int to convert value of string into an integer
;
pha Reserve room on stack for result.
lda svhisvalptr Get pointer to $HISTORY value.
ldx svhisvalptr+2
clc Add 4 to address to skip
adc #4 over length words.
bcc pushaddr
inx
pushaddr phx Push address onto stack.
pha
ldy #2
lda [svhisvalptr],y
pha Push length.
pea 0 Push signedFlag = 0 (unsigned)
Tool $280b Dec2Int
pla Get result.
sta size
jeq done
;
; Create and write history to file
;
Destroy DestroyParm
Create CreateParm
jcs done
Open OpenParm
bcs done
mv2 OpenRef,(WriteRef,WriteCRRef,CloseRef)
Destroy DestroyParm
Create CreateParm
jcs done
Open OpenParm
bcs done
mv2 OpenRef,(WriteRef,WriteCRRef,CloseRef)
loop1 mv4 historyptr,0
mv2 size,count
ldy #histNext+2
loop2 lda 0
ora 0+2
beq next
lda [0]
tax
dec count
beq write
lda [0],y
sta 0+2
stx 0
bra loop2
write clc
loop1 mv4 historyptr,0
mv2 size,count
ldy #histNext+2
loop2 lda 0
ora 0+2
beq next
lda [0]
tax
dec count
beq write
lda [0],y
sta 0+2
stx 0
bra loop2
write clc
lda 0
adc #4
tax
@ -363,53 +443,55 @@ write clc
pha
phx
jsr cstrlen
sta WriteReq
Write WriteParm
bcs doneclose
Write WriteCR
bcs doneclose
next dec size
bne loop1
sta WriteReq
Write WriteParm
bcs doneclose
Write WriteCR
bcs doneclose
next dec size
bne loop1
doneclose Close CloseParm
doneclose Close CloseParm
done rts
done pei (svhisvalptr+2) Free $SAVEHISTORY value buffer
pei (svhisvalptr)
jsl nullfree
RVParm dc a4'savehistStr'
dc a4'buffer'
goback return
DestroyParm dc i2'1'
dc a4'historyFN'
CreateParm dc i2'3'
dc a4'historyFN'
dc i2'$C3'
dc i2'0'
DestroyParm dc i2'1'
dc a4'historyFN'
OpenParm dc i2'2'
OpenRef ds 2
dc a4'historyFN'
CreateParm dc i2'3'
dc a4'historyFN'
dc i2'$C3'
dc i2'0'
WriteParm dc i2'4'
WriteRef ds 2
WriteBuf dc a4'buffer'
WriteReq ds 4
ds 4
OpenParm dc i2'2'
OpenRef ds 2
dc a4'historyFN'
WriteCR dc i2'4'
WriteCRRef ds 2
dc a4'CRBuf'
dc i4'1'
ds 4
CRBuf dc i1'13'
WriteParm dc i2'4'
WriteRef ds 2
WriteBuf dc a4'cmdline'
WriteReq ds 4
ds 4
CloseParm dc i2'1'
CloseRef ds 2
WriteCR dc i2'4'
WriteCRRef ds 2
dc a4'CRBuf'
dc i4'1'
ds 4
CRBuf dc i1'13'
size ds 2
count ds 2
CloseParm dc i2'1'
CloseRef ds 2
END
size ds 2
count ds 2
END
;=========================================================================
;
@ -417,65 +499,65 @@ count ds 2
;
;=========================================================================
ReadHistory START
ReadHistory START
using HistoryData
using global
using HistoryData
using global
lda historyFN
sta OpenParm+4
lda historyFN+2
lda historyFN+2
sta OpenParm+6
lda #0
sta historyptr
sta historyptr+2
Open OpenParm
bcs done
mv2 OpenRef,(ReadRef,NLRef,CloseRef)
NewLine NLParm
bcs doneclose
loop anop
Read ReadParm
bcs doneclose
ldy ReadTrans
beq doneclose
dey
lda #0
sta buffer,y
ph4 #buffer
jsl InsertHistory
bra loop
sta historyptr
sta historyptr+2
doneclose Close CloseParm
Open OpenParm
bcs done
mv2 OpenRef,(ReadRef,NLRef,CloseRef)
NewLine NLParm
bcs doneclose
done rts
loop anop
Read ReadParm
bcs doneclose
ldy ReadTrans
beq doneclose
dey
lda #0
sta cmdline,y
ph4 #cmdline
jsl InsertHistory
bra loop
OpenParm dc i2'2'
OpenRef ds 2
dc a4'historyFN'
doneclose Close CloseParm
NLParm dc i2'4'
NLRef ds 2
dc i2'$7F'
dc i2'1'
dc a4'NLTable'
NLTable dc i1'13'
done rts
ReadParm dc i2'4'
ReadRef ds 2
dc a4'buffer'
dc i4'1024'
ReadTrans ds 4
OpenParm dc i2'2'
OpenRef ds 2
dc a4'historyFN'
CloseParm dc i2'1'
CloseRef ds 2
NLParm dc i2'4'
NLRef ds 2
dc i2'$7F'
dc i2'1'
dc a4'NLTable'
NLTable dc i1'13'
size ds 2
ReadParm dc i2'4'
ReadRef ds 2
dc a4'cmdline'
dc i4'cmdbuflen'
ReadTrans ds 4
END
CloseParm dc i2'1'
CloseRef ds 2
size ds 2
END
;=========================================================================
;
@ -485,74 +567,89 @@ size ds 2
InitHistory START
using HistoryData
ph4 #histName
jsl AppendHome
stx historyFN+2
sta historyFN
ph4 #histName Create string
jsl AppendHome $HOME/history
stx historyFN+2 Store pointer to it
sta historyFN in historyFN
rts
END
;=========================================================================
;
; Print History
; Print History (this is the history command)
;
;=========================================================================
PrintHistory START
PrintHistory START
using HistoryData
using global
using HistoryData
using global
ptr equ 0
space equ ptr+4
ptr equ 0
status equ ptr+4
space equ status+2
subroutine (2:argc,4:argv),space
subroutine (4:argv,2:argc),space
lda historyptr
ora historyptr+2
beq done
stz status
lda numhist
sta num
loop1 mv4 historyptr,ptr
lda num
bmi done
sta count
loop2 lda count
beq print
ldy #histNext+2
lda [ptr]
tax
lda [ptr],y
sta ptr+2
stx ptr
ora ptr
beq next
dec count
bra loop2
lda argc
dec a
beq chkptr
print sub2 lasthist,num,@a
Int2Dec (@a,#numbstr,#4,#0)
ldx #^usage
lda #usage
jsr errputs
inc status Return status = 1.
bra done
chkptr lda historyptr
ora historyptr+2
beq done
lda numhist
sta num
loop1 mv4 historyptr,ptr
lda num
bmi done
sta count
loop2 lda count
beq print
ldy #histNext+2
lda [ptr]
tax
lda [ptr],y
sta ptr+2
stx ptr
ora ptr
beq next
dec count
bra loop2
print sub2 lasthist,num,@a
Int2Dec (@a,#numbstr,#4,#0)
ldx #^numbstr
lda #numbstr
jsr puts
clc
ldx ptr+2
lda ptr
adc #4
ok jsr puts
clc
ldx ptr+2
lda ptr
adc #4
ok jsr puts
jsr newline
next dec num
bra loop1
next dec num
bra loop1
done return
done return 2:status
numbstr dc c'0000: ',h'00'
num ds 2
count ds 2
numbstr dc c'0000: ',h'00'
num ds 2
count ds 2
END
usage dc c'Usage: history',h'0d00'
END
;=========================================================================
;
@ -560,15 +657,15 @@ count ds 2
;
;=========================================================================
HistoryData DATA
HistoryData DATA
lasthist dc i2'0'
numhist dc i2'0'
currenthist ds 4
historyptr dc i4'0'
historyStr str 'HISTORY'
savehistStr str 'SAVEHIST'
histName dc c'/history',i1'0'
lasthist dc i2'0'
numhist dc i2'0'
currenthist ds 4
historyptr dc i4'0'
historyStr gsstr 'HISTORY'
savehistStr gsstr 'SAVEHIST'
histName dc c'/history',i1'0'
historyFN ds 4
END
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
o/main
o/shell
o/history
o/prompt
o/cmd
o/expand
o/invoke
o/shellutil
o/builtin
o/hash
o/alias
o/dir
o/shellvar
o/jobs
o/sv
o/stdio
o/orca
o/edit
o/term
o/bufpool
direct
keep=gsh

View File

@ -6,22 +6,61 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: main.asm,v 1.9 1999/02/08 17:26:51 tribby Exp $
*
**************************************************************************
*
* MAIN.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* Startup portion of shell
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
keep o/main
mcopy m/main.mac
mcopy /obj/gno/bin/gsh/main.mac
setcom 60
**************************************************************************
; Segment for direct-page and stack
stack data STACK ; ends up in main.root
kind $12
; Define direct-page/stack and fill it with question marks it can be
; examined for how much is used.
dc 128c'??' ; 256 bytes
dc 128c'??' ; 512 bytes total
dc 128c'????' ; 1024 bytes total
dc 128c'????????' ; 2048 bytes total
end
**************************************************************************
init START
; Call the code to emulate C program startup:
; store Accumulator in ~USER_ID, X- and Y- registers as ~COMMANDLINE
; start up memory manager (~MM_INIT)
; parse commandline (via ~GNO_PARSEARG) and push argc and arvg on stack
jml ~GNO_COMMAND
; Control continues with the entry point "MAIN". When MAIN returns to
; ~GNO_COMMAND via rtl, it frees argv and argc before doing its own rtl.
END
MAIN START
MAIN START
using global
p equ 0
@ -40,41 +79,44 @@ ok stz FastFlag
stz CmdFlag
stz ExecFlag
argloop dec argc
jeq start
; Parse gsh's command-line arguments.
argloop dec argc Decrement argument count.
jeq go_start If none left, ready to start working.
clc
lda argv
adc #4
lda argv Point to next
adc #4 argument pointer.
sta argv
ldy #2
lda [argv]
sta arg
lda [argv] Set arg to point to
sta arg the argument text.
lda [argv],y
sta arg+2
lda [arg]
and #$FF
cmp #'-'
beq intoption
lda [arg] Get first character
and #$FF of argument.
cmp #'-' If it's a "-",
beq intoption handle as an option.
; parse remaining args as a command to run
; Parse remaining args as a command to run (in ExecCmd)
inc ExecFlag
inc FastFlag
ph4 #1024
jsl ~NEW
ph4 maxline_size
~NEW
sta ExecCmd
sta p
stx ExecCmd+2
stx p+2
cmd3 ldy #0
cmd0 lda [arg],y
cmd0 lda [arg],y
and #$ff
beq cmd1
sta [p],y
iny
bra cmd0
cmd1 lda #' '
cmd1 lda #' '
sta [p],y
sec ;inc a
tya
@ -84,7 +126,7 @@ cmd1 lda #' '
beq cmd2
clc
lda argv
adc #4
adc #4
sta argv
ldy #2
lda [argv]
@ -94,7 +136,10 @@ cmd1 lda #' '
bra cmd3
cmd2 lda #0
sta [p]
bra start
go_start bra start
; Parse an argument as an option (first character is "-")
intoption ldy #1
optloop lda [arg],y
@ -105,9 +150,12 @@ optloop lda [arg],y
cmp #'c'
beq parsec
; Option is not recognized.
showusage ErrWriteCString #usage
bra done
; Option = "-f": Skip history, gshrc
optf inc FastFlag
nextopt iny
@ -117,7 +165,8 @@ nextarg cpy #1
beq showusage
jmp argloop
parsec clc
; Option = "-c": execute shell commands found in file named by next argument
parsec clc
lda argv
adc #4
sta argv
@ -128,6 +177,9 @@ parsec clc
mv4 argv,CmdArgV
mv2 argc,CmdArgC
;
; When preliminary setup is complete, control transfers to here!
;
start case on
jsl shell
case off

45
bin/gsh/man/alias.1 Normal file
View File

@ -0,0 +1,45 @@
.TH ALIAS 1 "31 August 1996" GNO "Commands and Applications"
.SH NAME
.LP
alias - define alternate command name (gsh builtin)
.SH SYNOPSIS
.LP
.B alias
[ name command ]
.SH DESCRIPTION
.LP
The shell maintains a list of aliases that you can create, display,
and modify using the
.B alias
and
.B unalias
commands.
The shell checks the first word in each command to see if it matches
the name of an existing alias.
If it does, the command is reprocessed
with the alias definition replacing its name; the history
substitution mechanism is made available as though that command
were the previous input line.
This allows history substitutions,
escaped with a backslash in the definition, to be replaced with
actual command-line arguments when the alias is used.
If no
history substitution is called for, the arguments remain unchanged.
.LP
Aliases can be nested.
That is, an alias definition can contain
the name of another alias.
Nested aliases are expanded before any
history substitutions is applied.
This is useful in pipelines such as
.IP
alias lm "ls \-l | more"
.LP
which when called, pipes the output of
.BR ls (1)
through
.BR more (1).
.LP
Except for the first word, the name of the alias may not appear in its
definition, nor in any alias referred to by its definition.
Such loops are detected, and cause an error message.

26
bin/gsh/man/cd.1 Normal file
View File

@ -0,0 +1,26 @@
.TH CD 1 "31 August 1996" GNO "Commands and Applications"
.SH NAME
.LP
cd \- change working directory (gsh builtin)
.SH SYNOPSIS
.LP
.B cd
[
.I directory
]
.SH DESCRIPTION
.LP
.I directory
becomes the new working directory.
If
.B cd
is used without arguments, it returns you
to your $HOME directory.
.LP
Because a new process is created to execute each command,
.B cd
would be ineffective if it were written as a normal command. It is therefore
recognized and executed by the shells.
.SH "SEE ALSO"
.LP
.BR pwd (1)

18
bin/gsh/man/clear.1 Normal file
View File

@ -0,0 +1,18 @@
.TH CLEAR 1 "31 August 1996" GNO "Commands and Applications"
.SH NAME
.LP
clear \- clear the terminal screen (gsh builtin)
.SH SYNOPSIS
.LP
.B clear
.SH DESCRIPTION
.LP
.B clear
clears your screen if this is possible.
It looks in the environment for the terminal type and then in
.B 31/etc/termcap
to figure out how to clear the screen.
.SH FILES
.LP
.B 31/etc/termcap
terminal capability data base

17
bin/gsh/man/exit.1 Normal file
View File

@ -0,0 +1,17 @@
.TH EXIT 1 "31 August 1996" GNO "Commands and Applications"
.SH NAME
.LP
exit \- terminate process (gsh builtin)
.SH SYNOPSIS
.LP
exit
.SH DESCRIPTION
.LP
.B exit
causes the current shell to terminate.
.LP
If you receive the message
.B "You have stopped jobs."
You have attempted to exit the shell with stopped jobs under job control.
An immediate second attempt to exit will succeed, terminating
the stopped jobs.

92
bin/gsh/man/gsh.1 Normal file
View File

@ -0,0 +1,92 @@
.\"
.\" $Id: gsh.1,v 1.1 1998/06/04 03:11:28 gdr-ftp Exp $
.\"
.TH GSH 1 "2 June 1998" GNO "Commands and Applications"
.SH NAME
gsh \- GNO Shell
.SH SYNOPSIS
.B gsh
[
.B -f
] [
.BI -c " commands"
] [
.I scriptfile
]
.SH DESCRIPTION
.BR gsh
is the GNO Shell, so named because it was the first (and currently only)
shell to be made GNO-compatible.
It is the program which acts as the interface between the user and the
GNO kernel and various programs.
For a more complete description of
.BR gsh ,
see the
.IR "GNO Shell User's Manual" .
.LP
If
.IR scriptfile
is specified, it is assumed to be a
.BR gsh
shell script contained in a file of type SRC and auxtype EXEC.
The script is executed and then
.BR gsh
exits.
.LP
If
.BR -c " commands"
is specified,
.IR commands
is assumed to be a series of
.BR gsh
commands which are then executed as if they had been contained in a
.IR scriptfile .
See the section on BUGS, below.
.LP
If neither
.IR scriptfile
nor the
.BR -c
flag is specified, then
.BR gsh
starts up in interactive mode. In this case,
.BR gsh
will execute commands entered by the user until it gets the
.BR exit (1)
command, an EOF, or gets killed by another process.
.LP
The
.BR -f
flag indicates that on startup,
.BR gsh
should not attempt to parse the
.BR gshrc
file or do other initializations. This is intended to give a fast startup
in situations where these initializations are not required, however see
the section on BUGS, below.
.SH BUGS
The
.BR -c
flag does not work as advertised and may crash your machine if it is used.
.LP
Empirical tests are inconclusive as to whether or not the
.BR -f
flag really does speed up the starting of
.BR gsh .
.LP
Unfortunately, there are currently
.I many
other bugs in
.BR gsh .
For more information, see the GNO bug tracking system at
.BR http://www.gno.org/~gno/bugs.html .
.SH AUTHOR
.BR gsh
was written by Tim Meekins. It is currently maintained by Dave Tribby.
.SH "SEE ALSO"
.BR alias (1),
.BR cd (1),
.BR clear (1),
.BR exit (1),
the
.IR "GNO Shell User's Manual" .

View File

@ -1,41 +1,182 @@
mcopy mdb.mac
**************************************************************************
*
* The GNO Shell Project
*
* Developed by:
* Jawaid Bazyar
* Tim Meekins
*
* $Id: mmdebug.asm,v 1.6 1999/01/14 17:44:25 tribby Exp $
*
**************************************************************************
*
* MMDEBUG.ASM
* By Tim Meekins
* Rewritten by Dave Tribby for GNO 2.0.6
*
* Alternate routines for ~NEW and ~DISPOSE with extra debugging
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
*
*
**************************************************************************
~NEW START
hand equ 0
ptr equ 4
_~NEW name
mcopy /obj/gno/bin/gsh/mmdebug.mac
subroutine (4:size),8
dummymmdebug start ; ends up in .root
end
NewHandle (size,~USER_ID,#$C018,#0),hand
lda [hand]
setcom 60
DB~NEW START
hand equ 0 Handle allocated by memory manager
ptr equ hand+4 Pointer dereference of handle
space equ ptr+4
subroutine (4:size),space
lda size If size is 0,
ora size+2
bne newh
brk $A1 allocation error #1.
bra foul
;
; Allocate memory block of requested size using NewHandle
;
newh anop
pha Reserve space for
pha returned handle address.
ph4 size Amount of memory to allocate.
lda ~USER_ID Add the "auxID" tag
eor #$0D00 to the user ID so we
pha can identify our allocations.
pea $C018
pea 0
pea 0
tool $0902 NewHandle (size,~USER_ID,#$C018,#0)
plx Store handle at "hand",
stx hand preserving contents of
plx possible error code
stx hand+2 in accumulator.
bcc deref If there is a MM error,
brk $A2 allocation error #2.
foul stz ptr
stz ptr+2
bra goback
deref lda [hand] Dereference the handle.
sta ptr
ldy #2
lda [hand],y
sta ptr+2
return 4:ptr
*;
*; Fill memory with recognizable pattern
*;
* lda #"~~"
* ldy size
*dec_index dey
* dey
* bmi full
* sta [ptr],y
* bra dec_index
*
*full short a In case size was odd,
* sta [ptr] be sure the first byte
* long a gets the pattern.
goback return 4:ptr Return pointer to caller.
END
~DISPOSE START
DB~DISPOSE START
hand equ 0
checkptr equ 4
_~DISPOSE name
space equ checkptr+4
subroutine (4:ptr),8
subroutine (4:ptr),space
;
; First check: is address > $007FFFFF?
;
lda ptr+2
and #$FF80
beq findit
lda ptr
ldx ptr+2
brk $D1 Deallocate error #1.
bra goback
FindHandle ptr,hand
lda [hand]
sta checkptr
;
; Second check: is there a valid handle to this pointer?
;
findit FindHandle ptr,hand
lda hand Error if FindHandle
ora hand+2 returned 0.
bne ckptr
brk $D2 Deallocate error #2.
bra goback
ckptr lda [hand] Dereference the
sta checkptr found handle.
ldy #2
lda [hand],y
sta checkptr+2
eor ptr+2
eor ptr
eor checkptr
cmp ptr+2 If the pointer isn't
bne errD3 the first byte
lda checkptr of the handle,
cmp ptr there is a problem.
beq chkid
errD3 brk $D3
bra goback
chkid ldy #6 Get User ID word
lda [hand],y from handle header.
eor #$0D00 Remove aux ID of $0D00.
cmp ~USER_ID
beq okay
lda [hand],y
brk $D4 Deallocate error #4.
bra goback
brk $55
okay DisposeHandle hand Deallocate the memory.
bcc goback
brk $D5 Deallocate error #5.
goback return
END
DB~CHKBNK START
; Verify that data bank = program bank
; Call with jsr DB~CHKBNK
php Save Status Flags.
short m Go to 8-bit mode.
pha Save Accumulator.
phk Put Program Bank reg on stack.
phb Copy Data Bank register
pla into Accumulator.
cmp 1,s Compare DBR (in acc) to PBR (stack)
beq cleanup If not equal,
brk $B0 complain.
;
; Ready to return to the caller
;
cleanup pla Remove Program Bank reg from stack.
pla Restore original Accumulator and
plp Status Flags (including 8/16 bit mode)
rts
okay DisposeHandle hand
return
END

View File

@ -1,2 +0,0 @@
Removed two references to $E0C000 in shell.asm (signal handlers).
Bad Timmy!

View File

@ -6,24 +6,40 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: orca.asm,v 1.9 1999/02/08 17:26:51 tribby Exp $
*
**************************************************************************
*
* ORCA.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* Builtin commands for Orca compiling/editing, etc.
* Builtin command for ORCA editor
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
*
* edit subroutine (4:argv,2:argc) builtin command
*
**************************************************************************
keep o/orca
mcopy m/orca.mac
mcopy /obj/gno/bin/gsh/orca.mac
dummyorca start ; ends up in .root
end
setcom 60
**************************************************************************
*
* EDIT: builtin command
* syntax: edit pathname...
*
* Invokes an editor and edits a file or files.
* Invokes the ORCA editor and edits a file or files.
*
**************************************************************************
@ -34,9 +50,9 @@ strPtr equ 0
inLoopPtr equ strPtr+4
argLoopPtr equ inLoopPtr+4
sLen equ argLoopPtr+4
k equ sLen+2
j equ k+2
editcommand equ j+2
pathLen equ sLen+2
pnum equ pathLen+2
editcommand equ pnum+2
retval equ editcommand+4
sFile equ retval+2 GSString255Ptr
inPath equ sFile+4
@ -45,51 +61,55 @@ space equ outPath+4
subroutine (4:argv,2:argc),space
stz retval
stz sLen
lda #1
sta j
lda argc make sure there are two or
cmp #2 more parameters, otherwise we
bcs enoughparms
ldx #^enofile
lda #enofile
lda argc Make sure there are two or
cmp #2 more parameters.
bcs enoughparms Otherwise,
ldx #^enofile report error:
lda #enofile no filename specified
jsr errputs
lda #1
lda #1
sta retval
jmp goaway
jmp donedealloc
; Allocate memory for sFile, inPath, and outPath
enoughparms anop
jsl alloc1024
jsl allocmaxline
sta sFile
stx sFile+2
ora sFile+2
beq memerr1
beq memerr1
jsl alloc1024
jsl allocmaxline
sta inPath
stx inPath+2
ora inPath+2
beq memerr1
beq memerr1
jsl alloc1024
jsl allocmaxline
sta outPath
stx outPath+2
ora outPath+2
bne noerr1
bne noerr1
memerr1 ldx #^enomem
lda #enomem
memerr1 ldx #^enomem Report error:
lda #enomem out of memory
jsr errputs
lda #-1
sta retval
lda #-1
seterr sta retval
jmp goaway
; Parameters were provided, and memory has been allocated.
; Ready to start processing the filename(s).
noerr1 anop
lda sFile
stz retval Zero return status
stz sLen and length of source names.
lda #1 Initialize parameter
sta pnum number to 1.
lda sFile strPtr = sFile + 2
clc
adc #2
sta strPtr
@ -97,90 +117,84 @@ noerr1 anop
adc #0
sta strPtr+2
doloop lda j
cmp #2
bcc nodelimit
short m
lda #10 ; newline
sta [strPtr]
bra nodelimit Skip delimiter for 1st file.
; Loop for getting name, converting it to a full path, and
; appending it to sFile
doloop short m Between parameters:
lda #10 Store newline as delimiter
sta [strPtr] character in strPtr.
long m
inc sLen
inc strPtr
bne nodelimit
inc strPtr+2
inc sLen Bump string length
incad strPtr and pointer.
nodelimit anop
lda j
asl a ; get the proper argv pointer
asl a
tay
lda [argv],y
sta argLoopPtr
iny2
lda pnum Get parameter number
asl a and turn it into an
asl a index to the proper
tay argv pointer.
lda [argv],y Store address in
sta argLoopPtr direct page variable
iny2 argLoopPtr.
lda [argv],y
sta argLoopPtr+2
lda inPath get text field of inPath
clc
lda inPath Get address of text field
clc in inPath.
adc #2
sta inLoopPtr
sta inLoopPtr
lda inPath+2
adc #0
sta inLoopPtr+2
stz k
; Move argument into inPath, counting characters
whileloop lda [argLoopPtr]
and #$00FF
beq donewhile
ldy #0
short m
sta [inLoopPtr]
long m
inc argLoopPtr
bne noinc2
inc argLoopPtr+2
noinc2 inc inLoopPtr
bne noinc3
inc inLoopPtr+2
noinc3 inc k
lda k
cmp #255
bcc whileloop
ldx #^einval
lda #einval
whileloop lda [argLoopPtr],y Get next character of name.
and #$00FF If it's the terminating null,
beq donewhile done copying.
sta [inLoopPtr],y Store character (and null byte)
iny
cpy #255 If < 255,
bcc whileloop stay in loop.
ldx #^einval Print error:
lda #einval invalid argument (filename too long)
jsr errputs
lda #2
sta retval
jmp goaway
donewhile lda k
lda #2
bra seterr
donewhile tya Set length of GS/OS string inPath.
sta [inPath]
lda #1024
lda #1024 Set max len of result buffer outPath.
sta [outPath]
; Set up GS/OS ExpandPath parameter buffer and make call.
mv4 inPath,ep_inputPath
mv4 outPath,ep_outputPath
ExpandPath ep Expand the pathname.
ExpandPath ep
bcc noeperror
ldx #^err3
lda #err3
jsr errputs
lda #-1
sta retval
jmp goaway
; Note: The GS/OS reference says ExpandPath can detect invalid pathname
; syntax error, but I can't get this to happen (even with names like
; "::/^" and " "). Ignore errors and let the editor report them.
noeperror anop
ldy #2
ldy #2 Get length of result string
lda [outPath],y
sta k
sta pathLen and store in pathLen.
clc
adc sLen
cmp #MAXPARMBUF
bcs doloopend
adc sLen If accumulated length is
cmp #MAXPARMBUF beyond the maximum,
bcs doloopend don't add this name.
pei (k)
pei (outPath+2)
lda outPath
sta sLen Store accumulated length in sLen.
pei (pathLen) Append outPath string
pei (outPath+2) to the end of sFile's text.
lda outPath
clc
adc #4
pha
@ -188,99 +202,118 @@ noeperror anop
pei (strPtr)
jsl rmemcpy
lda sLen
lda strPtr Add pathLen to strPtr.
clc
adc k
sta sLen
lda strPtr
clc
adc k
adc pathLen
sta strPtr
lda strPtr+2
adc #0
sta strPtr+2
doloopend inc j
lda j
cmp argc
jcc doloop
lda sLen
sta [sFile]
mv4 sFile,gl_sFile
doloopend inc pnum pnum++
lda pnum if pnum < argc,
cmp argc
jcc doloop continue processing filenames.
Set_LInfoGS gl ;now set up the environment
; All of the arguments have been processed.
ph4 #editorvar
jsl getenv
lda sLen Save length in
sta [sFile] GS/OS buffer.
; Set up shell SetLInfo parameter buffer and make call.
mv4 sFile,gl_sFile
SetLInfoGS gl Set the edit environment.
ph4 #editorvar Get value of environment
jsl getenv variable "editor".
sta editcommand
stx editcommand+2
ora editcommand+2
bne goteditvar
ora editcommand+2
bne goteditvar If $editor is not defined,
ph4 #defedit use default value.
bra execit
ph4 #defedit
jsr p2cstr
sta editcommand
stx editcommand+2
goteditvar anop
pei (editcommand+2)
pei (editcommand)
ph2 #0 ;tells execute we're called by system
goteditvar anop Add 4 to value returned by getenv
ldx editcommand+2 to get address of text portion.
clc
lda editcommand
adc #4
bcc nobump
inx
nobump anop
phx Push address onto stack.
pha
execit ph2 #0 Tells execute we're called by system
jsl execute
sta retval
sta retval
pei (editcommand+2)
lda editcommand If getenv allocated it,
ora editcommand+2
beq goaway
pei (editcommand+2) free the "editcommand" string.
pei (editcommand)
jsl nullfree
jsl nullfree
goaway lda sFile
; See which GS/OS buffers need to be deallocated
goaway lda sFile
ora sFile+2
beq donedealloc
ldx sFile+2
lda sFile
jsl free1024
jsl freemaxline
lda inPath
ora inPath+2
beq donedealloc
lda inPath
ora inPath+2
beq donedealloc
ldx inPath+2
lda inPath
jsl free1024
jsl freemaxline
lda outPath
ora outPath+2
beq donedealloc
lda outPath
ora outPath+2
beq donedealloc
ldx outPath+2
lda outPath
jsl free1024
jsl freemaxline
donedealloc return 2:retval
ep dc i2'2'
ep_inputPath dc i4'0'
ep_outputPath dc i4'0'
; Return to caller with status set to value in retval
donedealloc return 2:retval
; Parameter block for GS/OS ExpandPath call (p. 140 in GS/OS Reference)
ep dc i2'2' pCount
ep_inputPath dc i4'0' input pointer (GS/OS string)
ep_outputPath dc i4'0' output pointer (GS/OS result buf)
; Error messages
enofile dc c'edit: no filename specified',h'0D00'
enomem dc c'edit: out of memory',h'0D00'
einval dc c'edit: invalid argument (filename too long)',h'0D00'
err3 dc c'edit: invalid path name',h'0d00'
; Parameter block for shell SetLInfo call (p. 433 in ORCA/M book)
gl anop
dc i2'11'
gl_sfile dc i4'0'
dc i4'nullparm'
dc i4'nullparm'
dc i4'nullparm'
dc i1'8'
dc i1'0'
dc i1'0'
dc i1'0'
dc i4'0'
dc i4'$8000000'
dc i4'0'
dc i2'11' pCount
gl_sfile dc i4'0' source file name (GS/OS string)
dc i4'nullparm' output file name (compile/link)
dc i4'nullparm' names in NAMES parameter list (compile)
dc i4'nullparm' compiler commands (compiler)
dc i1'0' max err level allowed (compile/link)
dc i1'0' max err level found (compile/link)
dc i1'0' operations flags (compile/link)
dc i1'0' keep flag (compile)
dc i4'0' minus flags (see ASML command descr)
dc i4'$08000000' plus flags [+E] (see ASML)
dc i4'0' origin (link)
nullparm dc i2'0'
editorvar dc c'editor',h'00'
defedit str '4:editor'
editorvar gsstr 'editor' Name of editor environment variable
defedit dc c'4:editor',h'00' Default value for editor
END

View File

@ -6,359 +6,387 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: prompt.asm,v 1.6 1998/09/08 16:53:12 tribby Exp $
*
**************************************************************************
*
* PROMPT.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* This displays the command-line prompt
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
keep o/prompt
mcopy m/prompt.mac
mcopy /obj/gno/bin/gsh/prompt.mac
WritePrompt START
dummyprompt start ; ends up in .root
end
using HistoryData
setcom 60
WritePrompt START
using HistoryData
prompt equ 0
hour equ prompt+4
minute equ hour+2
offset equ minute+2
promptgsbuf equ prompt+4
usergsbuf equ promptgsbuf+4
hour equ usergsbuf+4
minute equ hour+2
offset equ minute+2
pfx equ offset+2
space equ pfx+4
space equ pfx+4
year equ hour
monday equ minute
precmd equ prompt
year equ hour
monday equ minute
precmd equ prompt
subroutine (0:dummy),space
subroutine (0:dummy),space
ph4 #precmdstr
ph4 #precmdstr If "precmd" alias is defined,
jsl findalias
sta precmd
stx precmd+2
ora precmd+2
beq getvar
pei (precmd+2)
pei (precmd+2) execute it before parsing prompt.
pei (precmd)
ph2 #0
jsl execute
getvar Read_Variable promptparm
;
; Get value of $PROMPT environment variable
;
getvar ph4 #promptname
jsl getenv
php
sei ;interrupt free environment
lda promptbuf
and #$FF
bne parseprompt
php Turn off interrupts: mutex
sei won't do what we want!
sta promptgsbuf Save pointer to GS/OS result buffer.
stx promptgsbuf+2 If there is no memory to hold it,
ora promptgsbuf+2 it's undefined, or it has a
bne parseprompt length of 0,
ldx #^dfltPrompt
lda #dfltPrompt
jsr puts
jsr puts print the default prompt
bra donemark2 and exit.
bra donemark2
precmdstr dc c'precmd',h'00'
parseprompt anop
ph4 #promptbuf
jsr p2cstr
phx ;for disposal
pha
stx prompt+2
;
; Prompt string begins in result buffer after the two length words
;
parseprompt anop
clc
lda promptgsbuf
adc #4
sta prompt
lda promptgsbuf+2
adc #0
sta prompt+2
promptloop lda [prompt]
inc prompt
and #$FF
beq done
cmp #'%'
beq special
cmp #'!'
jeq phist
promptloop lda [prompt]
incad prompt
and #$FF
beq done
cmp #'%'
beq special
cmp #'!'
jeq phist
cmp #'\'
jeq quoteit
_putchar jsr putchar
bra promptloop
_putchar jsr putchar
bra promptloop
done jsr standend
done jsr standend
jsr cursoron
donemark2 anop
plp Restore interrupts.
pei (promptgsbuf+2) Free $PROMPT value buffer
pei (promptgsbuf)
jsl nullfree
donemark2 plp
jsr flush
return
return
;
; Previous character was a "%". Handle special character flags
;
special lda [prompt] Get character following "%".
incad prompt
and #$FF
beq done If end of string, all done.
cmp #'%' If another "%",
beq _putchar print the "%"
cmp #'h' If 'h'
beq phist
cmp #'!' or '!',
beq phist print history number.
cmp #'t' If 't'
beq ptime
cmp #'@' or '@',
beq ptime print time (am/pm format)
cmp #'S' If 'S',
jeq pstandout turn inverse mode on.
cmp #'s' If 's',
jeq pstandend turn inverse mode off.
cmp #'U' If 'U',
jeq punderline turn underline mode on.
cmp #'u' If 'u',
jeq punderend turn underline mode off
cmp #'d' If 'd'
jeq pcwd
cmp #'/' or '/',
jeq pcwd print working directory.
cmp #'c' If 'c'
jeq pcwdend
cmp #'C' or 'C'
jeq pcwdend
cmp #'.' or '.',
jeq pcwdend print final part of wrk dir.
cmp #'n' If 'n',
jeq puser print $USER
cmp #'W' If 'W',
jeq pdate1 print date (mm/dd/yy)
cmp #'D' If 'D',
jeq pdate2 print date (yy-mm-dd)
cmp #'~' If '~',
jeq ptilde print wrk dir with ~ subs.
jmp promptloop If none of these characters, ignore it.
special lda [prompt]
inc prompt
and #$FF
beq done
cmp #'%'
beq _putchar
cmp #'h'
beq phist
cmp #'!'
beq phist
cmp #'t'
beq ptime
cmp #'@'
beq ptime
cmp #'S'
jeq pstandout
cmp #'s'
jeq pstandend
cmp #'U'
jeq punderline
cmp #'u'
jeq punderend
cmp #'d'
jeq pcwd
cmp #'/'
jeq pcwd
cmp #'c'
jeq pcwdend
cmp #'C'
jeq pcwdend
cmp #'.'
jeq pcwdend
cmp #'n'
jeq puser
cmp #'W'
jeq pdate1
cmp #'D'
jeq pdate2
cmp #'~'
jeq ptilde
jmp promptloop
;
; Put history number
;
phist lda lasthist
inc a
jsr WriteNum
jmp promptloop
phist lda lasthist
inc a
jsr WriteNum
jmp promptloop
;
; Print current time
;
ptime ReadTimeHex (minute,hour,@a,@a)
lda hour
and #$FF
if2 @a,cc,#13,ptime2
sub2 @a,#12,@a
ptime2 if2 @a,ne,#0,ptime2b
ptime ReadTimeHex (minute,hour,@a,@a)
lda hour
and #$FF
if2 @a,cc,#13,ptime2
sub2 @a,#12,@a
ptime2 if2 @a,ne,#0,ptime2b
lda #12
ptime2b jsr WriteNum
ptime2b jsr WriteNum
lda #':'
jsr putchar
lda minute
xba
and #$FF
pha
cmp #10
bcs ptime2a
lda minute
xba
and #$FF
pha
cmp #10
bcs ptime2a
lda #'0'
jsr putchar
ptime2a pla
jsr WriteNum
lda hour
and #$FF
if2 @a,cs,#12,ptime3
ptime5 lda #'a'
bra ptime4
ptime3 lda #'p'
ptime4 jsr putchar
ptime2a pla
jsr WriteNum
lda hour
and #$FF
if2 @a,cs,#12,ptime3
ptime5 lda #'a'
bra ptime4
ptime3 lda #'p'
ptime4 jsr putchar
lda #'m'
jmp _putchar
;
; Set Stand Out
; Set Stand Out (turn on inverse mode)
;
pstandout jsr standout
pstandout jsr standout
jmp promptloop
;
; UnSet Stand Out
; UnSet Stand Out (turn off inverse mode)
;
pstandend jsr standend
pstandend jsr standend
jmp promptloop
;
; Set Underline
;
punderline jsr underline
punderline jsr underline
jmp promptloop
;
; UnSet Underline
;
punderend jsr underend
punderend jsr underend
jmp promptloop
;
;
; Current working directory
;
pcwd jsl alloc1024
pcwd anop
pea 0
jsl getpfxstr Get value of prefix 0.
sta pfx
stx pfx+2
sta GPpfx
stx GPpfx+2
lda #1024
sta [pfx]
GetPrefix GPParm
ldy #2
lda [pfx],y
clc
adc #3
sta offset
ldy #4
pcwd1 lda [pfx],y
and #$FF
jsr toslash
phy
jsr putchar
ply
iny
cpy offset
bcc pcwd1
ldx pfx+2
lda pfx
jsl free1024
jmp promptloop
ora pfx+2 If NULL pointer returned,
jeq promptloop an error was reported.
ldy #4 Text starts at byte 4.
pcwd1 lda [pfx],y Get next
and #$FF character.
beq freepfx Done when at end of string.
jsr toslash Convert to slash.
phy Hold index on stack
jsr putchar while printing character.
ply
iny Bump index
bra pcwd1 and stay in loop.
freepfx ph4 pfx Free the current directory buffer.
jsl nullfree
jmp promptloop
;
; Current tail of working directory
; Tail of current working directory
;
pcwdend anop
jsl alloc1024
pcwdend anop
pea 0
jsl getpfxstr Get value of prefix 0.
sta pfx
stx pfx+2
sta GPpfx
stx GPpfx+2
lda #1024
sta [pfx]
GetPrefix GPParm
ldy #2
lda [pfx],y
clc
adc #3
ora pfx+2 If NULL pointer returned,
jeq promptloop an error was reported.
ldy #2 Get string's length word
lda [pfx],y from bytes 2 & 3.
clc Add 3 to get offset
adc #3 from beginning of buffer.
sta offset
tay
pcwdend1 dey
bmi pcwdend2
lda [pfx],y
and #$FF
cmp #':'
bne pcwdend1
pcwdend2 iny
cpy offset
beq pcwdend3
lda [pfx],y
and #$FF
cmp #':'
beq pcwdend3
phy
pcwdend1 dey If we've backed up to the beginning,
bmi pcwdend2 we can't go any further!
lda [pfx],y Get next character.
and #$FF
cmp #':' If it's not ':',
bne pcwdend1 keep searching backward.
pcwdend2 iny
cpy offset
jeq freepfx Free the current directory buffer.
lda [pfx],y
and #$FF
cmp #':'
jeq freepfx Free the current directory buffer.
phy
jsr putchar
ply
bra pcwdend2
pcwdend3 ldx pfx+2
lda pfx
jsl free1024
jmp promptloop
ply
bra pcwdend2
;
; Current working directory substituting '~' if necessary
;
ptilde anop
jsl alloc1024
ptilde anop
pea 0
jsl getpfxstr Get value of prefix 0.
sta pfx
stx pfx+2
sta GPpfx
stx GPpfx+2
lda #1024
sta [pfx]
GetPrefix GPParm
ldy #2
lda [pfx],y
clc
adc #4
tay
lda #0
sta [pfx],y
pei (pfx+2)
lda pfx
clc
adc #4
ora pfx+2 If NULL pointer returned,
jeq promptloop an error was reported.
lda pfx Otherwise, restore low-order address.
clc Add 4 to start of buffer
adc #4 so it can be treated like
bcc pushad a c-string.
inx
pushad phx
pha
jsl path2tilde
phx
pha
jsr puts
jsl ~DISPOSE
ldx pfx+2
lda pfx
jsl free1024
jmp promptloop
;
jsl path2tilde Convert $HOME to "~"
phx Push addr onto stack
pha for nullfree.
jsr puts Print tilde string.
jsl nullfree Free the converted string.
jmp freepfx Free the current directory buffer.
;
; Write user name
;
puser Read_Variable userparm
ldx #^buf2
lda #buf2
jsr putp
jmp promptloop
puser ph4 #username Get value of $USER
jsl getenv
sta usergsbuf If buffer wasn't allocated
stx usergsbuf+2
ora usergsbuf+2
beq goploop ignore it.
clc
lda usergsbuf Text begins after
adc #4 four bytes of
bcc printit length words.
inx
printit jsr puts
pei (usergsbuf+2) Free $USER value buffer
pei (usergsbuf)
jsl nullfree
goploop jmp promptloop
;
; Write date as mm/dd/yy
;
pdate1 ReadTimeHex (@a,year,monday,@a)
lda monday
and #$FF00
xba
inc a
jsr WriteNum
pdate1 ReadTimeHex (@a,year,monday,@a)
lda monday
and #$FF00
xba
inc a
jsr WriteNum
lda #'/'
jsr putchar
lda monday
and #$FF
inc a
jsr WriteNum
lda monday
and #$FF
inc a
jsr WriteNum
lda #'/'
jsr putchar
lda year
and #$FF00
xba
jsr WriteNum
jmp promptloop
lda year
and #$FF00
xba
jsr WriteNum
jmp promptloop
;
; Write date as yy-mm-dd
;
pdate2 ReadTimeHex (@a,year,monday,@a)
lda year
and #$FF00
xba
jsr WriteNum
pdate2 ReadTimeHex (@a,year,monday,@a)
lda year
and #$FF00
xba
jsr WriteNum
lda #'-'
jsr putchar
lda monday
and #$FF00
xba
inc a
jsr WriteNum
lda monday
and #$FF00
xba
inc a
jsr WriteNum
lda #'-'
jsr putchar
lda monday
and #$FF
inc a
jsr WriteNum
jmp promptloop
lda monday
and #$FF
inc a
jsr WriteNum
jmp promptloop
;
; check for \ quote
;
quoteit lda [prompt]
inc prompt
and #$FF
jeq done
quoteit lda [prompt]
incad prompt
and #$FF
jeq done
cmp #'n'
beq newline
cmp #'r'
@ -374,42 +402,44 @@ tab lda #9
jmp _putchar
backspace lda #8
jmp _putchar
;
;
; Write a number between 0 and 9,999
;
WriteNum cmp #10
bcs write1
adc #'0'
WriteNum cmp #10
bcs write1
adc #'0'
jmp putchar
write1 cmp #100
bcs write2
Int2Dec (@a,#num+2,#2,#0)
write1 cmp #100
bcs write2
Int2Dec (@a,#num+2,#2,#0)
ldx #^num+2
lda #num+2
jmp puts
write2 cmp #1000
bcs write3
Int2Dec (@a,#num+1,#3,#0)
write2 cmp #1000
bcs write3
Int2Dec (@a,#num+1,#3,#0)
ldx #^num+1
lda #num+1
jmp puts
write3 Int2Dec (@a,#num,#4,#0)
write3 Int2Dec (@a,#num,#4,#0)
ldx #^num
lda #num
jmp puts
GPParm dc i2'2'
dc i2'0'
GPpfx dc a4'0'
promptparm dc a4'promptname'
dc a4'promptbuf'
promptname str 'prompt'
dfltPrompt dc c'% ',h'00'
num dc c'0000',h'00'
promptbuf ds 256
userparm dc a4'user'
dc a4'buf2'
user str 'user'
buf2 ds 256
END
; Name of alias to execute before prompt
precmdstr dc c'precmd',h'00'
; Names of environment variables
promptname gsstr 'prompt'
username gsstr 'user'
; Default prompt
dfltPrompt dc c'% ',h'00'
num dc c'0000',h'00'
END

View File

@ -6,51 +6,88 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: shell.asm,v 1.11 1999/11/30 17:53:27 tribby Exp $
*
**************************************************************************
*
* SHELL.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* This is the main routines for the shell.
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
*
* shell subroutine (0:dummy)
* NOTE: gnoloop is an entry defined in shell.
*
* AppendHome subroutine (4:str)
* return 4:outPtr
*
* Dogshrc jsr with no parameters
*
* signal2 subroutine (4:fubar)
*
* signal18 subroutine (4:fubar)
*
* signal21 subroutine (4:fubar)
*
**************************************************************************
keep o/shell
mcopy m/shell.mac
mcopy /obj/gno/bin/gsh/shell.mac
dummyshell start ; ends up in .root
end
setcom 60
SIGINT gequ 2
SIGTSTP gequ 18
SIGCHLD gequ 20
SIGTTIN gequ 21
cmdbuflen gequ 1024
cmdbuflen gequ 1024
case on
shell start
case off
**************************************************************************
*
* shell: entry point for acting upon commands
*
**************************************************************************
case on
shell start
case off
using global
using global
using pdata
using HistoryData
using termdata
p equ 0
space equ p+4
using termdata
p equ 0 General pointer
cflag equ p+4 Flag: set when path converted
space equ cflag+2
subroutine (0:dummy),space
tsc
sta cmdcontext
tdc
sta cmddp
tsc Save stack pointer
sta cmdcontext in cmdcontext
tdc and direct page reg
sta cmddp in cmddp.
* PushVariables 0
PushVariablesGS NullPB Save environment variables.
Open ttyopen
bcc settty
Open ttyopen Open tty,
bcc settty checking for error.
ErrWriteCString #ttyerr
jmp quit
ttyerr dc c'gsh: Failed opening tty.',h'0d00'
settty mv2 ttyref,gshtty
tcnewpgrp gshtty
settpgrp gshtty
@ -59,124 +96,250 @@ settty mv2 ttyref,gshtty
jsr InitTerm
lda FastFlag
bne fastskip1
lda gshpid ; only print the copyright msg
cmp #2 ; if not using login
lda FastFlag If FastFlag is set,
bne fastskip1 skip copyright message.
lda gshpid Only print the copyright msg
cmp #2 if not using login
bne fastskip1
ldx #^gnostr
lda #gnostr
jsr puts
fastskip1 anop
;
; Set up signal handlers
;
signal (#SIGINT,#signal2)
signal (#SIGTSTP,#signal18)
signal (#SIGCHLD,#pchild)
signal (#SIGTTIN,#signal21)
;
; Set entry point for users calling system
;
setsystemvector #system
;
; Initialize some stuff
;
lda FastFlag
jsr initalias Set all AliasTable entries to 0.
jsr InitDStack Zero out directory stack.
jsr InitVars Set value of all env var flags.
;
; Check for login shell (argv[0] starts with '-')
;
mv4 ~COMMANDLINE,p Copy commandline addr to dir page.
ldy #8 Skip over shell identifier
lda [p],y to get first char of
and #$FF command name.
cmp #'-' If not '-',
bne nologin_init skip over login initialization.
; Change ":" to " " in $PATH if it doesn't start with ":" or contain a " "
ph4 #pathname Get $PATH environment variable string
jsl getenv
sta p Save address of allocated buffer.
stx p+2 in direct page variable
ora p+2 If null,
beq nopathconv no need to convert
stz cflag Initialize conversion flag = false.
ldy #4 Index over GS/OS length fields.
short m Use 8-bit mode.
lda [p],y
beq endpathconv If null string, or
cmp #':' if first character is ':',
beq endpathconv don't do the conversion.
bumpit iny
lda [p],y
beq endpathconv If at end of string, all done.
cmp #' ' If $PATH contains a space,
bne chkcolon
stz cflag abort the conversion.
bra endpathconv
chkcolon cmp #':' If next character is ':',
bne bumpit
lda #' ' change it to ' ', and
sta [p],y
sta cflag set conversion flag = true.
bra bumpit
endpathconv long m Back to 16-bit mode.
lda cflag If there was no conversion,
beq freepath skip the setting of $PATH.
clc Address of $PATH as a GS/OS
lda p output string is 2 bytes
adc #2 beyond the input string
sta SetValue starting address.
lda p+2
adc #0
sta SetValue+2
SetGS SetPB Set $PATH to the converted value.
freepath ph4 p Free the $PATH C string.
jsl nullfree
nopathconv anop
; Read and execute /etc/glogin
ph4 #etcglogin path = "/etc/glogin"
lda #0
pha argc = 0
pha argv = NULL
pha
lda #$8000
pha jobflag = $8000
jsl ShellExec
; Read and execute $HOME/glogin
jsr Doglogin
;
; Initialization that is not specific to login shells
;
nologin_init anop
lda FastFlag If fast startup flag isn't set,
bne fastskip2
jsr InitHistory
jsr ReadHistory ;Read in history from disk
fastskip2 jsr initalias ;initialize alias
jsr InitDStack ;initialize directory stack
lda FastFlag
bne fastskip3
jsr DoLogin ;Read gshrc
jsr InitHistory Init: historyFN->"$HOME/history",
jsr ReadHistory read in history from disk,
jsr Dogshrc and read $HOME/gshrc.
jsr newline
fastskip3 anop
fastskip2 anop
lda didReadTerm
bne didit
jsr readterm
didit jsl hashpath ;hash $path
didit anop
jsr dispose_hash Remove old table (if set in
jsl hashpath login files) and hash $PATH.
ld2 1,done_init Set initialization done flag.
;
; Check for command-line arguments -c and -e
;
lda CmdFlag
beq cmdskip
;
; The -c flag is set: execute remaining arguments as a command file and exit.
;
mv4 CmdArgV,p
ldy #2
lda [p],y
pha
lda [p]
pha
ph2 CmdArgc
pei (p+2)
ph2 CmdArgc argc
pei (p+2) argv
pei (p)
pea 0
pea 0 jobflag = 0
jsl ShellExec
jmp done1
cmdskip lda ExecFlag
beq execskip
ph4 ExecCmd
ph2 #0
jsl Execute
jmp done1
;
; The -e flag is set: execute remaining arguments as a command and exit.
;
ph4 ExecCmd cmdline
ph2 #0 jobflag = 0
jsl execute
jmp done1
execskip anop
;
; Parameter block for shell SetGS calls (p 427 in ORCA/M manual)
;
SetPB dc i2'3' pCount
dc i4'pathname' Name (pointer to GS/OS string)
SetValue ds 4 Value (pointer to GS/OS string)
dc i2'1' Export flag
pathname gsstr 'path' GS/OS string
etcglogin dc c'/etc/glogin',h'00'
execskip anop
****************************************************************
*
* Main loop for reading and executing commands
*
****************************************************************
stz lastabort
gnoloop entry
gnoloop entry
phk
plb
;
; Set the fundamental registers.
;
phk Copy Program Bank register
plb into Data Bank register.
lda cmdcontext Set Stack Pointer and
tcs Direct Page register
lda cmddp to values saved when
tcd entering shell.
lda cmdcontext ;dare you to make a mistake
tcs
lda cmddp
tcd
jsl WritePrompt
jsr GetCmdLine
bcs done
jsl WritePrompt Print prompt.
jsr GetCmdLine Get response.
bcs done
jsr newline
lda cmdlen
beq gnoloop
jsr cursoron
lda cmdlen Check for empty string.
beq gnoloop
jsr cursoron
jsr newlineX
jsr flush
ph4 #cmdline
ph2 #0
jsl execute
lda exitamundo
ph4 #cmdline execute(cmdline,0)
ph2 #0 jobflag = 0
jsl execute
lda exit_requested
bne done1
jsr newlineX
jsr newlineX
stz lastabort
bra gnoloop
bra gnoloop
;
; shut down gsh
;
done jsr newline
done jsr newline
jsr newlineX
done1 ora2 pjoblist,pjoblist+2,@a
done1 ora2 pjoblist,pjoblist+2,@a
beq done2
lda lastabort
lda lastabort
bne donekiller
inc lastabort
stz exitamundo
ldx #^stopstr
lda #stopstr
stz exit_requested
ldx #^stopstr Print message:
lda #stopstr "There are stopped jobs"
jsr puts
jsr newlineX
bra gnoloop
bra gnoloop Continue getting commands.
donekiller jsl jobkiller
done2 lda FastFlag
bne fastskip5
jsr SaveHistory
fastskip5 jsr dispose_hash
jsl SaveHistory
fastskip5 jsr dispose_hash
quit PopVariables 0
Quit QuitParm
QuitParm dc i'0'
quit PopVariablesGS NullPB
Quit QuitParm
gnostr dc h'0d',c'GNO/Shell 2.0.4',h'0d'
dc c'Copyright 1991-1993, Procyon, Inc. & Tim Meekins. '
dc c'ALL RIGHTS RESERVED',h'0d'
dc h'0d00'
QuitParm dc i'0'
; Null parameter block used for shell calls PushVariables
; (ORCA/M manual p.420) and PopVariablesGS (p. 419)
NullPB dc i2'0' pCount
gnostr dc h'0d',c'GNO/Shell 2.0.6',h'0d'
dc c'Copyright 1991-1993, Procyon, Inc. & Tim Meekins. '
dc c'ALL RIGHTS RESERVED',h'0d'
dc h'0d00'
stopstr dc c'gsh: There are stopped jobs.',h'0d00'
ttyopen dc i2'2'
@ -188,142 +351,222 @@ exitstr dc c'000000',h'0d00'
lastabort ds 2
END
END
;=========================================================================
;
; Interpret the login file (gshrc).
; If $HOME is set, we presume the gshrc file is there. If not,
; If $HOME is set, we presume the gshrc file is there. If not,
; or if an error occurs getting the $HOME variable, we use
; @:gshrc.
;
;=========================================================================
Dogshrc START
* Appends a C string to the value of the $HOME variable. If $HOME is
* not set, then it appends the C string to the string '@/'. Returns
* a pointer to a GC string. Call DisposeHome/AX to deallocate the
* string.
ph4 #gshrcName
bra doit
; Alternate entry point: execute $HOME/glogin
Doglogin ENTRY
ph4 #gloginName
doit jsl AppendHome
phx Save pointer to GS/OS input
pha string for later.
clc Adjust the pointer
adc #2 to skip the length word
bcc no_ovf so it's a C string.
inx
no_ovf phx
pha
* ShellExec subroutine (4:path,2:argc,4:argv,2:jobflag)
; (ptr to $HOME/gshrc is on stack)
lda #0
pha argc = 0
pha argv = NULL
pha
lda #$8000
pha jobflag = $8000
jsl ShellExec
; Dispose $HOME/gshrc string
pla Get address of
plx GS/OS input string.
sec Subtract two bytes to get
sbc #2 addr of original output buffer.
bcs no_undf
dex
no_undf phx
pha
jsl nullfree
rts
gshrcName dc c'/gshrc',h'00'
gloginName dc c'/glogin',h'00'
DisposeHome START
dec a
dec a
jsl free256
rtl
END
;=========================================================================
;
; Append a C string to the value of the $HOME variable. If $HOME is
; not set, then it appends the C string to the string '@/'. Returns
; a pointer to a GS/OS input string.
;
;=========================================================================
AppendHome START
outPtr equ 0
len equ 4
subroutine (4:str),6
jsl alloc256
stx outPtr1+2
sta outPtr1
stx outPtr+2
sta outPtr
outPtr equ 0 Pointer into allocated memory
str_len equ outPtr+4 Length of string parameter
buf_len equ str_len+2 Size of GS/OS buffer
space equ buf_len+2
pei (str+2)
pei (str)
jsr cstrlen
sta len
subroutine (4:str),space
lda #256
sta [outPtr]
lock mutex
;
; Get the variable's length using ReadVariableGS
;
ld4 TempResultBuf,RVresult Use temporary result buf.
ReadVariableGS ReadVar Get length.
GSOS $014B,rvbl ;ReadVariable
bcs doAtSign
;
; Allocate memory for value string
;
pei (str+2) Get length of
pei (str) string to be
jsr cstrlen appended.
sta str_len
ldy #2
lda [outPtr],y
beq doAtSign ; $HOME not defined?
clc
adc #4 ; turn into a cstring
tay
short m
lda #0
lda TempRBlen Get length of value.
bne notnull If 0,
inc a increment because "@" will be used.
notnull inc2 a Add 4 bytes for result buf len words.
inc2 a
clc Add length of string parameter.
adc str_len
sta buf_len Save result buf length.
inc a Add 1 more for terminating null byte.
pea 0
pha
~NEW Request the memory.
sta RVresult Store address in ReadVariable
stx RVresult+2 parameter block and
sta outPtr direct page pointer.
stx outPtr+2
ora outPtr+2 If address == NULL,
beq exit return NULL to user.
lda buf_len Store result buffer length
sta [outPtr] at beginning of buf.
;
; Read the full value into the allocated memory
;
ReadVariableGS ReadVar ReadVariable $HOME
bcs doAtSign If error, use @/
ldy #2 Get length of
lda [outPtr],y GS/OS string.
beq doAtSign If $HOME not defined, use "@".
clc
adc #4 Turn into a c-string
tay by storing a 0 byte
short m after the last $HOME
lda #0 character.
sta [outPtr],y
long m
bra doAppend
;
; $HOME is null string or not defined. Use @
;
doAtSign lda atSign
ldy #4
sta [outPtr],y
lda #1
ldy #2
ldy #4
sta [outPtr],y
lda #1 Set GS/OS buffer
ldy #2 string length word
sta [outPtr],y to 1.
doAppend anop
ldy #0
doAppend anop
ldy #4 Start index beyond length words.
short m
lp lda [outPtr],y
beq noSep
beq noSep
cmp #':'
beq foundSep
cmp #'/'
beq foundSep
iny
iny
bra lp
noSep lda #':'
foundSep sta [str]
noSep lda #':' No separator found; use ":".
foundSep sta [str] Store sep at start of appended string.
long m
pei (str+2)
pei (str)
pei (outPtr+2)
ldx outPtr+2
lda outPtr
clc
adc #4
bcc pushptr
inx
pushptr phx
pha
case on
jsl strcat
case off
inc outPtr
inc outPtr
lda [outPtr]
clc
adc len
sta [outPtr] ; adjust GS/OS string length
clc Add 2 bytes to address of
lda outPtr GS/OS output buffer to
adc #2 get address of GS/OS
bcc no_ovf input string.
inc outPtr+2
no_ovf sta outPtr
lda [outPtr] Adjust string length
clc to include appended
adc str_len string (parameter).
sta [outPtr]
;
; NOTE: The returned value points to a GS/OS string, two bytes offset
; from the allocated memory for a GS/OS result buffer. When the
; memory is deallocated, the address must be adjusted back.
;
exit unlock mutex
return 4:outPtr
atSign dc c'@',i1'0'
rvbl dc i2'3'
dc a4'in'
outPtr1 dc a4'0'
dc i2'0' ; value of 'Export' flag
mutex key
in dosin 'HOME'
atSign dc c'@',i1'0'
;
; Parameter block for Shell call ReadVariable (p 423 in ORCA/M reference)
;
ReadVar anop
dc i2'3' pCount
dc a4'home' address of variable's name
RVresult ds 4 GS/OS Output buffer ptr
ds 2 export flag (returned)
;
; GS/OS result buffer for getting the full length of the HOME env var.
;
TempResultBuf dc i2'5' Only five bytes total.
TempRBlen ds 2 Value's length returned here.
ds 1 Only 1 byte for value.
;
; "HOME" as a GS/OS string
;
home gsstr 'HOME'
END
DoLogin START
ph4 #gshrcName
jsl AppendHome
phx ; saved pointer for later
pha
phx
inc a
inc a ; adjust to the C string
pha
lda #0
pha
pha
pha
pea 0
jsl shellexec
pla
plx
jsl DisposeHome
rts
gshrcName dc c'/gshrc',h'00'
END
;=========================================================================
;
@ -331,25 +574,23 @@ gshrcName dc c'/gshrc',h'00'
;
;=========================================================================
global DATA
global DATA
ID ds 2
GSOSDP ds 2
cmdloc ds 2
cmdlen ds 2
cmdline ds cmdbuflen
buffer ds 256
ID ds 2
GSOSDP ds 2
cmdloc ds 2
cmdlen ds 2
cmdline ds cmdbuflen
wordlen ds 2
wordpbuf ds 1
wordbuf ds 256
nummatch ds 2
matchbuf ds 512*4
cmdcontext ds 2
cmdcontext ds 2
cmddp ds 2
gshtty ds 2
gshpid ds 2
exitamundo dc i'0' ;!=0 if exit
gshpid ds 2
exit_requested dc i'0' ;!=0 if exit
signalled dc i'0'
done_init dc i2'0' 0 until init is complete
FastFlag dc i'0'
CmdFlag dc i'0'
@ -358,7 +599,7 @@ CmdArgC ds 2
ExecFlag dc i'0'
ExecCmd ds 4
END
END
;=========================================================================
;
@ -399,3 +640,31 @@ signal18 START
msg dc c'^Z',h'0d0a00'
END
;=========================================================================
;
; SIGTTIN handler
;
;=========================================================================
;
; Work-around for kernel problem: if background read error signal
; is received, gsh will hang forever. Instead, quit.
;
signal21 START
using global
subroutine (4:fubar),0
WriteCString #bg_msg Print message.
Quit QuitParm
QuitParm dc i'0'
; return
bg_msg dc c'gsh: SIGTTIN received!!',h'0d0a00'
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,10 +6,13 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: stdio.asm,v 1.6 1998/10/26 17:04:51 tribby Exp $
*
**************************************************************************
*
* STDIO.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* This is the custom stdio for the shell
*
@ -17,10 +20,17 @@
* stderr buffer size: 256 bytes
* stdin buffer size: 128 bytes
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
keep o/stdio
mcopy m/stdio.mac
mcopy /obj/gno/bin/gsh/stdio.mac
dummystdio start ; ends up in .root
end
setcom 60
**************************************************************************
*
@ -33,23 +43,24 @@ putchar START
using stdout
tay ;lock destroys Acc
lock mutex
tya
and #$FF
ldx index
sta stream,x ;we're still in long mode, note extra
inx ; length of stream by one :)
cmp #13
beq _flush
cpx #512
bcc done
_flush stx index
Write WriteParm
ldx #0
done stx index
unlock mutex
rts
tay Note: lock destroys Acc
lock mutex Wait for others to leave, and lock.
tya
and #$FF Isolate the single character.
ldx index Get num of chars already in stream.
sta stream,x Store this char + null byte.
inx Bump length of stream by one.
cmp #13 If character was newline,
beq _flush go write the stream.
cpx #512 If length < 512,
bcc done all done.
_flush stx index Save current length.
Write WriteParm Write the stream.
ldx #0 Set new length to 0.
done stx index Save stream length in global.
unlock mutex Allow others through.
rts Return to caller.
END
@ -64,101 +75,49 @@ puts START
using stdout
tay ;lock destroys Acc
lock mutex
sty getchar+1
tay Note: lock destroys Acc
lock mutex Wait for others to leave, and lock.
sty getchar+1 Save low-order bytes of address.
txa
short a
sta getchar+3
ora getchar+2
ora getchar+1
beq exit
short a SWITCH TO SINGLE-BYTE MEMORY MODE.
sta getchar+3 Store high-order byte of address.
ora getchar+2 If string address
ora getchar+1 is 00/0000,
beq exit don't do the write.
ldy index
ldx #0
ldy index Get current number of chars in stream.
ldx #0 Clear source string offset.
getchar lda >$FFFFFF,x
beq done
sta stream,y
iny
inx
cmp #13
beq _flush
cpy #512
bcc getchar
getchar lda >$FFFFFF,x Get next character from string.
beq done Done when we see a null byte.
sta stream,y Store in output stream.
iny Bump the stream and
inx string pointers.
cmp #13 If newline was encountered,
beq _flush go write & flush the stream.
cpy #512 If stream length < 512,
bcc getchar continue copying characters.
_flush sty index
phx
long a
Write WriteParm
Flush flushparm
short a
plx
ldy #0
bra getchar
_flush sty index Save length of stream.
phx Hold source string offset on stack.
long a SWITCH TO FULL-WORD MEMORY MODE.
Write WriteParm Write the stream to stdout
Flush flushparm and flush it.
short a SWITCH TO SINGLE-BYTE MEMORY MODE.
plx Restore source string offset to X-reg.
ldy #0 Set stream length to 0.
bra getchar Continue copying characters.
done sty index
exit long a
unlock mutex
rts
; Arrive here when null character is encountered.
done sty index Save stream length in global.
END
exit long a SWITCH TO FULL-WORD MEMORY MODE.
unlock mutex Allow others through.
rts Return to caller.
**************************************************************************
*
* putp - output a p string to standard out
* On entry: A/X = pointer to string
*
**************************************************************************
END
putp START
using stdout
tay ;lock destroys Acc
lock mutex
sty getchar+1
sty cmpchar+1
txa
short a
sta getchar+3
sta cmpchar+3
ldy index
ldx #1
bra next
getchar lda >$FFFFFF,x
sta stream,y
iny
inx
cmp #13
beq _flush
next txa
cmpchar cmp >$FFFFFF
beq check2
bcs done
check2 cpy #512
bcc getchar
_flush sty index
phx
long a
Write WriteParm
Flush flushparm
short a
plx
ldy #0
bra next
done sty index
long a
unlock mutex
rts
END
**************************************************************************
*
@ -170,12 +129,12 @@ flush START
using stdout
lock mutex
lock mutex
lda index
beq skip
Write WriteParm
Write WriteParm
Flush flushparm
stz index
stz index
skip unlock mutex
rts
@ -216,9 +175,9 @@ errputchar START
using stderr
tay ;lock destroys Acc
tay ;lock destroys Acc
lock errmutex
tya
tya
and #$FF
ldx errindex
sta errstream,x
@ -228,7 +187,7 @@ errputchar START
cpx #256
bcc done
_flush stx errindex
Write errWriteParm
Write errWriteParm
ldx #0
done stx errindex
unlock errmutex
@ -247,16 +206,16 @@ errputs START
using stderr
tay ;lock destroys Acc
tay ;lock destroys Acc
lock errmutex
sty getchar+1
sty getchar+1
txa
short a
sta getchar+3
ldy errindex
ldx #0
ldx #0
getchar lda >$FFFFFF,x
beq done
@ -271,71 +230,18 @@ getchar lda >$FFFFFF,x
_flush sty errindex
phx
long a
Write errWriteParm
Write errWriteParm
short a
plx
ldy #0
bra getchar
bra getchar
done sty errindex
long a
unlock errmutex
rts
END
**************************************************************************
*
* errputp - output a p string to standard error
* On entry: A/X = pointer to string
*
**************************************************************************
errputp START
using stderr
tay ;lock destroys Acc
lock errmutex
sty getchar+1
sty cmpchar+1
txa
short a
sta getchar+3
sta cmpchar+3
ldy errindex
ldx #1
getchar lda >$FFFFFF,x
sta errstream,y
iny
inx
cmp #13
beq _flush
next txa
cmpchar cmp >$FFFFFF
beq check2
bcs done
check2 cpy #256
bcc getchar
_flush sty errindex
phx
long a
Write errWriteParm
short a
plx
ldy #0
bra next
done sty errindex
long a
unlock errmutex
rts
END
END
**************************************************************************
*
@ -347,9 +253,9 @@ errflush START
using stderr
lock errmutex
Write errWriteParm
stz errindex
lock errmutex
Write errWriteParm
stz errindex
unlock errmutex
rts
@ -394,8 +300,12 @@ getchar START
readloop Read inReadParm
bcc okread
ldy #-1 ;return EOF on ALL errors
jmp done2
ldy #-1 Return EOF if error code
cmp #$4C is "EOF encountered".
beq go_done2
ora #$FF00 For all other errors,
tay hi-byte is $FF, low-byte is error.
go_done2 jmp done2
okread stz inindex
lda insize

View File

@ -6,18 +6,45 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: sv.asm,v 1.7 1998/12/31 18:29:14 tribby Exp $
*
**************************************************************************
*
* SV.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* String Vector routines.
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
*
* Interfaces defined in this file:
*
* sv_alloc subroutine (2:size)
* return 4:ptr
*
* sv_add subroutine (4:vect,4:string,2:allocflag)
*
* sv_dispose subroutine (4:vect)
*
* sv_colprint subroutine (4:sv)
*
* sv_sort subroutine (4:sv)
*
* _qsort subroutine (4:sv,2:left,2:right)
*
**************************************************************************
keep o/sv
mcopy m/sv.mac
mcopy /obj/gno/bin/gsh/sv.mac
dummysv start ; ends up in .root
end
setcom 60
**************************************************************************
*
* Allocate a string vector array
@ -25,7 +52,7 @@
**************************************************************************
sv_alloc START
ptr equ 0
space equ ptr+4
@ -34,33 +61,31 @@ space equ ptr+4
lda size
inc a ;for size and count
inc a ;at least one null entry
asl a
asl a Multiply by 4 (bytes/entry).
asl a
pea 0
pha
jsl ~NEW
sta ptr
stx ptr+2
~NEW Allocate the memory
sta ptr and save address in
stx ptr+2 direct page variable.
ldy #2
lda size
sta [ptr],y
lda #0
ldy #2 Store number of entries
lda size as the value of the
sta [ptr],y first entry's high byte
lda #0 and zero as the low byte.
sta [ptr]
ldy #4
ldx size
ldy #4 Set Y to index to 2nd entry.
ldx size X = num of entries following.
init sta [ptr],y
iny
iny
init sta [ptr],y Set all entries
iny2 to 0x00000000.
sta [ptr],y
iny
iny
iny2
dex
bpl init ;not bne so that extra null at end
add4 ptr,#4,ptr
add4 ptr,#4,ptr Set ptr to point at second entry.
return 4:ptr
@ -73,59 +98,61 @@ init sta [ptr],y
**************************************************************************
sv_add START
p equ 0
base equ p+4
space equ base+4
subroutine (4:vect,4:string,2:allocflag),space
sub4 vect,#4,base
sub4 vect,#4,base base points to entry # 0.
ldy #2
lda [base],y
cmp [base]
beq exit ;ack, the vector is full!
lda [base],y If number of entries in table
cmp [base] == number in use,
beq exit the vector is full!
;
; 1 = allocate memory, 0 = use string as is...
;
lda allocflag
lda allocflag If "allocate memory" flag is set,
beq asis
pei (string+2)
pei (string)
pei (string+2) Determine length of
pei (string) new string.
jsr cstrlen
inc a
pea 0
pha
jsl ~NEW
sta p
~NEW Allocate memory for it.
sta p Store address in p/p+1.
stx p+2
pei (string+2)
pei (string)
pei (string+2) Copy the string into
pei (string) the new memory.
phx
pha
jsr copycstr
bra doit
bra doit else
asis mv4 string,p
asis mv4 string,p Just copy address to p/p+1.
;
; p contains address of string to be added to the vector.
;
doit lda [base]
tax
tax X = number of entries in use.
asl a
asl a
tay
lda p
tay Y = offset to next avail entry.
lda p Set entry to address of added string.
sta [vect],y
iny
iny
iny2
lda p+2
sta [vect],y
txa
inc a
sta [base]
sta [base] Bump the number of entries in use.
exit return
@ -144,27 +171,27 @@ space equ p+4
subroutine (4:vect),space
sub4 vect,#4,p
sub4 vect,#4,p p points to head of vector
loop lda [p]
beq done
lda [p] Get number of entries in use.
beq done Done if zero.
loop asl a
asl a
asl a
tay
tay Y points to last used entry.
lda [vect],y
tax
iny
iny
iny2
lda [vect],y
pha
phx
jsl nullfree
jsl nullfree Free memory used by this entry.
lda [p]
dec a
sta [p]
bra loop
sta [p] Number used = number used - 1.
bne loop If more to do, stay in loop.
done pei (p+2)
done pei (p+2) Free the vector itself.
pei (p)
jsl nullfree
@ -188,35 +215,32 @@ space equ maxlen+2
subroutine (4:sv),space
sub4 sv,#4,base
sub4 sv,#4,base base = ptr to entry 0.
;
; Find the maximum string length
;
lda #1
sta maxlen
ldy #0
lda #0
lda #0 Keep track of entry number in Acc.
lenloop pha
asl a
asl a
tay Y = offset to entry number.
lda [sv],y
tax
iny
iny
iny2
lda [sv],y
iny
iny
phy
pha
phx
jsr cstrlen
cmp maxlen
jsr cstrlen Get length of entry's string.
cmp maxlen If > maxlen,
bcc nextlen
sta maxlen
nextlen ply
pla
inc a
cmp [base]
bcc lenloop
sta maxlen set maxlen to this length.
nextlen pla
inc a Bump entry number.
cmp [base] If not done,
bcc lenloop stay in loop.
;
; add one for a space
;
@ -226,19 +250,26 @@ nextlen ply
; a divide..
;
ldx #0
txa
dex
lda maxlen
clc
colloop inx
adc maxlen
cmp #80
bcc colloop
cpx #6+1
bcc okcol
ldx #6 ;limit of 6 columns
cpx #6+1 Make sure there
bcc okcol are no more
ldx #6 than 6 columns.
okcol stx numcol
lda [base]
cmp numcol Ensure number of columns
bcs okcol2 <= number of entries
tax
stx numcol
okcol2 anop
;
; recalculate the width
; recalculate the width based upon columns/80
;
UDivide (#80,@x),(maxlen,@a)
;
@ -250,29 +281,30 @@ okcol stx numcol
beq foocol
inc numrow
foocol anop
;
; find the index for each column...
;
;
lock offtblmutex
lda #0
tax
clc
mkidxloop sta offtbl,x
inx
inx2
adc numrow
cmp [base]
bcc mkidxloop
stx numcol Double numcol since it's compared
ldx #0 against X to end the loop.
;
; well....I think we can print now (yay!)
; Ready to print...
;
ldx #0
printloop lda offtbl,x
and #$FF
cmp [base]
bcs nextprint0
inc a
short a
sta offtbl,x
long a
phx
dec a
asl a
@ -280,8 +312,7 @@ printloop lda offtbl,x
tay
lda [sv],y
tax
iny
iny
iny2
lda [sv],y
pha
phx
@ -298,7 +329,7 @@ tabit cmp maxlen
inc a
bra tabit
nextprint plx
inx
inx2
cpx numcol
bcc printloop
nextprint0 jsr newline
@ -306,10 +337,16 @@ nextprint0 jsr newline
dec numrow
bne printloop
doneprint return
unlock offtblmutex
offtbl ds 7
return
;
; Offset table: one entry for each column
;
offtbl ds 14
offtblmutex key
END
**************************************************************************
@ -337,6 +374,8 @@ space equ 0
END
**************************************************************************
_qsort PRIVATE
vleft equ 0
@ -366,8 +405,7 @@ space equ idx1+2
tay
lda [sv],y
sta ptr1
iny
iny
iny2
lda [sv],y
sta ptr1+2
add2 left,right,@a
@ -379,8 +417,7 @@ space equ idx1+2
sta ptr2
lda ptr1
sta [sv],y
iny
iny
iny2
lda [sv],y
sta ptr2+2
lda ptr1+2
@ -388,8 +425,7 @@ space equ idx1+2
ldy idx1
lda ptr2
sta [sv],y
iny
iny
iny2
lda ptr2+2
sta [sv],y
;
@ -403,8 +439,7 @@ space equ idx1+2
tay
lda [sv],y
sta vleft
iny
iny
iny2
lda [sv],y
sta vleft+2
;
@ -426,8 +461,7 @@ okloop anop
tay
lda [sv],y
tax
iny
iny
iny2
lda [sv],y
pha
phx
@ -446,8 +480,7 @@ okloop anop
tay
lda [sv],y
sta ptr1
iny
iny
iny2
lda [sv],y
sta ptr1+2
lda i
@ -458,8 +491,7 @@ okloop anop
sta ptr2
lda ptr1
sta [sv],y
iny
iny
iny2
lda [sv],y
sta ptr2+2
lda ptr1+2
@ -467,8 +499,7 @@ okloop anop
ldy idx1
lda ptr2
sta [sv],y
iny
iny
iny2
lda ptr2+2
sta [sv],y
@ -476,7 +507,7 @@ nextloop inc i
jmp forloop
;
; swap(v, left, last)
;
;
endloop lda left
asl a
asl a
@ -484,8 +515,7 @@ endloop lda left
tay
lda [sv],y
sta ptr1
iny
iny
iny2
lda [sv],y
sta ptr1+2
lda last
@ -496,8 +526,7 @@ endloop lda left
sta ptr2
lda ptr1
sta [sv],y
iny
iny
iny2
lda [sv],y
sta ptr2+2
lda ptr1+2
@ -505,8 +534,7 @@ endloop lda left
ldy idx1
lda ptr2
sta [sv],y
iny
iny
iny2
lda ptr2+2
sta [sv],y
;
@ -529,7 +557,7 @@ endloop lda left
pha
pei (right)
jsl _qsort
exit return
END

View File

@ -6,51 +6,90 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: term.asm,v 1.8 1998/12/21 23:57:08 tribby Exp $
*
**************************************************************************
*
* TERM.ASM
* By Tim Meekins
* Modified by Dave Tribby for GNO 2.0.6
*
* Routines for dealing with Termcap under gsh.
*
* Note: text set up for tabs at col 16, 22, 41, 49, 57, 65
* | | | | | |
* ^ ^ ^ ^ ^ ^
**************************************************************************
keep o/term
mcopy m/term.mac
mcopy /obj/gno/bin/gsh/term.mac
dummyterm start ; ends up in .root
end
setcom 60
TIOCGETP gequ $40067408
**************************************************************************
*
* Initialize the system for termcap - checks to see if $TERM exists
* and is set, if not, sets to GNOCON
* and is set, if not, sets to GNOCON; and allocate termcap buffers.
*
**************************************************************************
InitTerm START
using termdata
Set_Variable setparm
Export expparm
;
; See if $TERM exists
;
ReadVariableGS ReadVarPB
lda term_len Get length of $TERM
bne allocate If 0,
SetGS SetPB set to default ("gnocon")
allocate anop Allocate termcap buffers.
ph4 #1024
jsl ~NEW
sta bp
~NEW
sta bp
stx bp+2
ph4 #1024
jsl ~NEW
~NEW
sta areabuf
stx areabuf+2
rts
setparm dc i4'termname' ;default term type
dc i4'termval'
rts Return to caller.
expparm dc i4'termname'
dc i2'1'
;
; Parameter block for shell ReadVariableGS call (p 423 in ORCA/M manual)
;
ReadVarPB anop
dc i2'3' pCount
dc i4'term' Name (pointer to GS/OS string)
dc i4'dummyresult' GS/OS Output buffer ptr
ds 2 export flag
;
; GS/OS result buffer for getting length of TERM env var.
;
dummyresult dc i2'5' Only five bytes total.
term_len ds 2 Value's length returned here.
ds 1 Only 1 byte for value.
termname str 'term'
termval str 'gnocon'
;
; Parameter block for shell SetGS calls (p 427 in ORCA/M manual)
;
SetPB anop
dc i2'3' pCount
dc i4'term' Name (pointer to GS/OS string)
dc i4'gnocon' Value (pointer to GS/OS string)
dc i2'1' Export flag
term gsstr 'term'
gnocon gsstr 'gnocon'
END
@ -69,42 +108,52 @@ forward_char equ 4
up_history equ 5
down_history equ 6
lda #1
lda #1
sta didReadTerm
ph4 #termname
jsl getenv
phx
pha
phx Push allocated buffer on stack
pha for later call to nullfree.
clc Add 4 to GS/OS result buffer
adc #4 to get pointer to text.
bcc val_addr_set
inx
val_addr_set sta hold_term_val
stx hold_term_val+2
tgetent (bp,@xa) ;xa is pushed first
beq noentry
dec a
beq ok
jsl nullfree
jsl nullfree Free buffer allocated by getenv.
stz termok
ldx #^error1
lda #error1
jmp errputs
noentry jsl nullfree
noentry anop
stz termok
ldx #^error2
lda #error2
jsr errputs
ph4 #termname
jsl getenv
jsr errputs
lda #error2 Print error message:
jsr errputs 'Termcap entry not found for '
lda hold_term_val Get text from buffer allocated
ldx hold_term_val+2 by getenv
jsr errputs and print it.
jsl nullfree Free buffer allocated by getenv.
lda #13
jmp errputchar
ok jsl nullfree
ok jsl nullfree Free buffer allocated by getenv.
lda #1
sta termok
mv4 areabuf,area
mv4 areabuf,area
;
; Get addresses of termcap strings
;
tgetstr (#isid,#area)
jsr puts
jsr puts Send initialization string to term.
tgetstr (#leid,#area)
sta lecap
stx lecap+2
@ -141,24 +190,27 @@ ok jsl nullfree
tgetstr (#usid,#area)
sta uscap
stx uscap+2
;
; Bind keyboard characters
;
tgetstr (#klid,#area)
phx
phx
pha
ph2 #backward_char
jsl bindkeyfunc
tgetstr (#krid,#area)
phx
phx
pha
ph2 #forward_char
jsl bindkeyfunc
tgetstr (#kuid,#area)
phx
phx
pha
ph2 #up_history
jsl bindkeyfunc
tgetstr (#kdid,#area)
phx
phx
pha
ph2 #down_history
jsl bindkeyfunc
@ -174,26 +226,30 @@ ok jsl nullfree
rts
termname dc c'term',h'00'
termname gsstr 'term'
error1 dc c'Error reading termcap file!',h'0d0d00'
error2 dc c'Termcap entry not found for ',h'00'
isid dc c'is',h'00'
leid dc c'le',h'00'
ndid dc c'nd',h'00'
veid dc c've',h'00'
viid dc c'vi',h'00'
vsid dc c'vs',h'00'
blid dc c'bl',h'00'
clid dc c'cl',h'00'
soid dc c'so',h'00'
seid dc c'se',h'00'
klid dc c'kl',h'00'
krid dc c'kr',h'00'
kuid dc c'ku',h'00'
kdid dc c'kd',h'00'
cdid dc c'cd',h'00'
ueid dc c'ue',h'00'
usid dc c'us',h'00'
;
; Termcap identification strings
;
isid dc c'is',h'00' Initialization
leid dc c'le',h'00' Out of keypad transmit mode
ndid dc c'nd',h'00' Non-destructive space
veid dc c've',h'00' Normal cursor visible
viid dc c'vi',h'00' Cursor unvisible
vsid dc c'vs',h'00' Standout cursor
blid dc c'bl',h'00' Bell
clid dc c'cl',h'00' Clear screen and home cursor
soid dc c'so',h'00' Begin standout mode
seid dc c'se',h'00' End standout mode
cdid dc c'cd',h'00' Clear to end of display
ueid dc c'ue',h'00' End underscore mode
usid dc c'us',h'00' Begin underscore mode
klid dc c'kl',h'00' Left arrow key
krid dc c'kr',h'00' Right arrow key
kuid dc c'ku',h'00' Up key
kdid dc c'kd',h'00' Down key
sgtty anop
dc i1'0'
@ -201,8 +257,12 @@ sg_ospeed dc i1'0'
dc i1'0'
dc i1'0'
sg_flags dc i2'0'
; Hold the address of the value of $TERM
hold_term_val ds 4
END
**************************************************************************
*
* outc for outputting characters by termcap
@ -441,13 +501,27 @@ tset START
using global
space equ 0
status equ 0
space equ status+2
subroutine (4:argv,2:argc),space
jsr readterm
stz status
lda argc
dec a
beq doterm
return
ldx #^Usage
lda #Usage
jsr errputs
inc status Return status = 1.
bra exit
doterm jsr readterm
exit return 2:status
usage dc c'Usage: tset',h'0d00'
END
@ -462,7 +536,7 @@ termdata DATA
didReadTerm dc i2'0'
termok dc i2'0'
insertflag dc i2'1'
insertflag dc i2'1'
bp ds 4
areabuf ds 4
@ -482,4 +556,4 @@ vicap ds 4
vscap ds 4
END

40
bin/gsh/tests/Makefile Normal file
View File

@ -0,0 +1,40 @@
#
# This makefile is intended for use with dmake(1) on Apple IIGS
# $Id: Makefile,v 1.1 1999/11/30 20:28:24 tribby Exp $
#
# Created by Dave Tribby (beginning June 1998)
# This makefile creates the simple test programs used for gsh testing.
# These two programs are used directly by the dotests command script:
# echoparams echo parameters passed from command line;
# uses reparse.asm assembly language subroutine
# callsystem call the system() library subroutine
#
# The remaining two programs can be run to verify the system
# shellenv print information on the shell environment
# testfork use fork/_execve/wait/kill the way gsh does
# Make sure lint is turned on
CFLAGS += -w
all: echoparams callsystem shellenv testfork
# echoparams has a helper subroutine named reparse.
echoparams.o: echoparams.c
reparse.o: reparse.asm
echoparams: echoparams.c reparse.asm
17/occ -o echoparams.o -i -w -a0 -c echoparams.c
17/occ -o reparse.o -i -w -a0 -c reparse.asm
17/occ -o echoparams echoparams.o reparse.o
rm -f echoparams.root echoparams.o reparse.root reparse.o
clean:
rm -f *.o
rm -f *.root
clobber: clean
rm -f echoparams callsystem shellenv testfork

View File

View File

@ -0,0 +1,2 @@
ls: ls -l
mv: cp -p mv

View File

@ -0,0 +1,6 @@
alias commands fg prefix setdebug unhash
bg dirs hash ps setenv unset
bindkey echo history pushd source which
cd edit jobs pwd stop
chdir exit kill rehash tset
clear export popd set unalias

View File

@ -0,0 +1,4 @@
- - - - - - - - - - E C H O T E S T S - - - - - - - - - -
Testing whether the echo command inserts an extra space:
There should be no space between -><- the '->' and '<-'

View File

@ -0,0 +1,2 @@
callsystem.c dotests echoparams.c shellenv.c testfork.c

View File

@ -0,0 +1,25 @@
apropos cp gsh.debug pwd testfork
aroff cpp gsh.nodebug rcp testjobs
asml ctags gsh.r releasemem testjobs2
assemble cut gsh0 removerez time
aw30 date head rlogin touch
awk day help rm tr
basename describe hostname rmdir true
binprint df init rsh udl
callsystem diff install script uname
cat dirname kill sed uncompress
catrez dmake last setvers uniq
center dotests launch shellenv unshar
chmod du less singletc uptime
chtyp echo link sleep vi
cksum echoparams logger smallbi wall
cmdtest egrep ls split wc
cmdtest4fr false lseg strings whatis
cmdtestmul fgrep man stty whereis
cmp fmt mkdir su who
cmpl freeze more sum whois
coff ftp nroff tail yankit
colcrt fulltests.mul passwd tar yes
compile getvers print10params tee
compress grep ps test
copycat gsh purge testedit

View File

@ -0,0 +1,15 @@
Command line: echoparams 'Parameter #1' "" p3 '' "Last param"
parameter 0: 'echoparams'
parameter 1: ''Parameter'
parameter 2: '#1''
parameter 3: ''
parameter 4: 'p3'
parameter 5: ''''
parameter 6: 'Last param'
Reparsing...
parameter 0: 'echoparams'
parameter 1: 'Parameter #1'
parameter 2: ''
parameter 3: 'p3'
parameter 4: ''
parameter 5: 'Last param'

View File

@ -0,0 +1,11 @@
Command line: echoparams '{ print "Hello, world" }' filename
parameter 0: 'echoparams'
parameter 1: ''{'
parameter 2: 'print'
parameter 3: 'Hello, world'
parameter 4: '}''
parameter 5: 'filename'
Reparsing...
parameter 0: 'echoparams'
parameter 1: '{ print "Hello, world" }'
parameter 2: 'filename'

View File

@ -0,0 +1 @@
Test variable has been set to 1

View File

@ -0,0 +1,14 @@
Command line: echoparams "Parameter #1" "" p3 "" "Last param"
parameter 0: 'echoparams'
parameter 1: 'Parameter #1'
parameter 2: ''
parameter 3: 'p3'
parameter 4: ''
parameter 5: 'Last param'
Reparsing...
parameter 0: 'echoparams'
parameter 1: 'Parameter #1'
parameter 2: ''
parameter 3: 'p3'
parameter 4: ''
parameter 5: 'Last param'

View File

@ -0,0 +1,2 @@
Test of system() function
`` returns value = 0

View File

@ -0,0 +1 @@
This is test command number 1

View File

@ -0,0 +1 @@
This is test command number 2

View File

@ -0,0 +1,18 @@
 *: :H1:
0: :src:gno:bin:gsh:tests:
1: :obj:gno:bin:gsh:
2: :lib:
3: :tmp:
4: :lang:orca:shell:
5: :lang:orca:languages:
6: :lang:orca:utilities:
8: :home:cmd:
9: :obj:gno:bin:gsh:
10: .CONSOLE:
11: .CONSOLE:
12: .CONSOLE:
13: :lib:
14: :tmp:
15: :lang:orca:shell:
16: :lang:orca:languages:
17: :lang:orca:utilities:

Some files were not shown because too many files have changed in this diff Show More