Compare commits

...

783 Commits
v1_2 ... master

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
gdr
9c1ef2e905 udl is done 1997-12-22 01:20:42 +00:00
gdr
8ec58c91e3 compress/zcat
sum/cksum
runover
gno/kerntool.h
1997-12-22 01:20:23 +00:00
gdr
12a86e690f make sure top-level files are tarred up 1997-12-22 01:11:08 +00:00
gdr
737a2b2acb - changed descu so that it updates the "last changed" field in the
database source "header"
- updated some of the README info
1997-12-22 00:34:52 +00:00
gdr
4cdec01660 - put mkso into the normal build directories instead of it being a
special case
- modified mkso to put files in an alternate (presumably HFS) directory,
  if necessary
1997-12-21 22:39:13 +00:00
gdr
1e28540ab0 use segments on the IIgs 1997-12-21 22:11:07 +00:00
gdr
07177f48d1 test more floating point data formats in printf 1997-12-21 20:15:27 +00:00
gdr
b998993162 added trivial test for fts routines 1997-12-21 20:14:21 +00:00
gdr
5aa367e6ff added Tilghman's settimeofday(2) implementation 1997-12-21 20:13:19 +00:00
gdr
97ab3c7a62 - fixed segment name
- changed location of macro include files
1997-12-21 20:12:27 +00:00
gdr
6b8ea553ee added more stack routines 1997-12-21 20:11:17 +00:00
gdr
4aafacd78b fix a bad patch(1) run 1997-12-21 20:05:41 +00:00
gdr
007531d795 - no longer specify -I flags on the command line; include files must
already be in /usr/include and other system directories.
1997-12-21 20:04:19 +00:00
gdr
3a0978f855 added _assertStack and _getStackBottom 1997-12-21 19:58:15 +00:00
gdr
2a490753dc don't use FTS_WHITEOUT for GNO (yet) 1997-12-21 19:57:19 +00:00
gdr
a0525b81fd decl of fts_set was missing '*' for the first parm 1997-12-21 19:44:24 +00:00
gdr
b294c85eb2 settimeofday is now (partially) implemented 1997-12-21 19:43:03 +00:00
gdr
5132e3d0b4 remove msort .so link; use mkso instead 1997-12-21 19:42:00 +00:00
gdr
5b6c4960d5 mkso moved to sbin directory 1997-12-21 19:41:00 +00:00
gdr
7861f65bbb - Soenke submitted various changes (mostly path names) for v1.0.4 that
I missed.
- The pathname of the compiled database was changed to match the sources
  (/usr/lib/describe.db)
- The location of the online database is now mentioned.
1997-12-20 17:14:00 +00:00
gdr
0e5599af83 initial checkin of FilePort/NullPort sources 1997-12-19 07:54:52 +00:00
gdr
c1f439e0a7 Incorporated into the GNO base distribution.
Changed the initialization for the getopt(3) package to work with
     BSD-based systems (like GNO v2.0.6) as well as with GNU-based
     systems.
  Use proper capitalization for "UNIX" and "ORCA".
1997-12-19 07:48:16 +00:00
gdr
7276456260 Put in some fixes that came out of FreeBSD-Current. Compilations not
yet verified on the IIgs.  Also, dumped #ifdef's that avoided use of
fdopen from before fdopen was available in libc.
1997-12-19 06:34:31 +00:00
gdr
d34f9db837 Initial checkin for GNO, such that it actually compiles and links.
No functional differences.  Not tested.
1997-12-08 16:07:19 +00:00
gdr
be57edaf08 Added documentation for _assertStack and _getMinStack. 1997-12-08 15:39:11 +00:00
gdr
6065babc81 added two more stack routines 1997-12-08 15:15:19 +00:00
gdr
b72fd53882 added a necessary escape character 1997-12-08 15:14:52 +00:00
gdr
79ab0e7f2b insight'ed cpp. Nothing found that should be of interest. 1997-12-08 03:40:12 +00:00
gdr
619c3191d1 added a link to the File System Hierarchy "standard" in the "related links"
section
1997-12-06 07:04:49 +00:00
gdr
9553efb5cf change the suffix of the html faq log so that it views correctly 1997-12-06 07:02:52 +00:00
gdr
3773fe3366 update some locations for trenco 1997-12-03 06:46:41 +00:00
gdr
10327349c4 initial checkin. Documents how to build the manuals. 1997-12-02 15:38:13 +00:00
gdr
e7bb29a749 cpp still isn't working right, but this is an interim checkin:
- compiled for GNO
- added stack diagnostics and error checking
- made large auto arrays static, where possible
- added checks for unexpected recursion
1997-12-02 08:05:53 +00:00
gdr
492cb296f2 added entries for kern ref manual index, _assertStack implementation 1997-12-02 05:31:57 +00:00
gdr
ed43cf427a added listing for regex and stack checking routines 1997-12-02 05:28:37 +00:00
gdr
7da4e89117 update various utilities, mostly contributions from Dave 1997-12-02 05:27:55 +00:00
gdr
fae3756359 - initial checkin, (mostly) as submitted by Dave Tribby 1997-12-02 05:15:27 +00:00
gdr
2823a7ab61 fix the build order for the 'upload' target 1997-11-30 07:56:21 +00:00
gdr
b37ae6415c fixed a table 1997-11-30 06:49:42 +00:00
gdr
17de7accde - updated to list the ftp locations of the various documents 1997-11-30 06:45:16 +00:00
gdr
ce32f61b41 Finished incorporating all the info from the Aug 96 version. Cleaned
it up, and updated some of the info (like distribution restrictions and
obtaining help).
1997-11-28 17:11:06 +00:00
gdr
56e2923d4c deleted an unused user environment 1997-11-28 17:10:14 +00:00
gdr
30c2697ed0 initial checkin 1997-11-28 17:07:01 +00:00
gdr
753315d345 don't snag the sed tests, which happen to have names that look like man pages 1997-11-24 06:46:18 +00:00
gdr
c2951e680e - added the html man pages to the default target
- fixed the making of the html man pages so that they only happen
  when they're actually required.
1997-11-24 05:46:29 +00:00
gdr
71090e862f Initial checkin of documentation (latex/html source). Only the
kern reference is really ready for viewing, and that is still missing
the index.
1997-11-24 05:07:28 +00:00
gdr
1f1b3ada37 Initial checkin of gsh v1.1 as provided by Tony Diaz. 1997-11-18 05:31:00 +00:00
gdr
99e3b1cd28 Changed some code that was causing nroff errors. This page still has
to be reviewed; there are still problems with it.
1997-11-17 04:47:51 +00:00
gdr
dabc2c9205 initial checkin, as contributed by Dave Tribby 1997-11-17 04:27:06 +00:00
gdr
8590ffb646 These are Dave Tribby's changes that were necessary to make
sed (which uses these routines) work correctly.  See the file
GNO.notes for more details.
1997-11-17 04:13:08 +00:00
gdr
a3f1e8a401 added list of BSD system calls that are unimplemented in GNO. 1997-11-03 03:15:58 +00:00
gdr
ebebdd3a04 avoid duplicates of usr.orca.bin in xfer directory 1997-11-01 19:49:27 +00:00
gdr
11f6208435 - added entries for the unfinished routines localeconv(3) and setlocale(3)
- added rmdir(2) entry (finished)
- added entries for the libcontrib package
1997-11-01 19:37:44 +00:00
gdr
8e355814f7 - Checked in and verified various utils from Evan, Dave, Derek, and Devin.
- Assigned udl to Soenke.
1997-11-01 19:36:19 +00:00
gdr
657ead2d08 added Yet More Stuff 1997-11-01 19:34:29 +00:00
gdr
9a6d867e7f for the junk.c target:
- Use macros for -I flag values rather than explicit directories
	- Use a text diversion rather than explicit shell redirection.
	  This avoids a gsh hang on some systems.
1997-11-01 19:16:29 +00:00
gdr
072c984053 make CHDIR macro work when NDEBUG is defined (and therefore the assert
is a null op).
1997-11-01 19:12:16 +00:00
gdr
37a13feeb9 [Changes submitted by Derek Taubert.]
binconst.mk, binrules.mk:
	The $(MAIN) macro is now the basename of the file containing
	the main() function, and therefore the only .root file that
	should exist is $(MAIN).root.  If MAIN is not set in the lower
	level makefiles, it defaults to $(PROG).

paths.mk:
	ORCA_DIST has changed from /orca-native to /lang/orca.
1997-11-01 19:10:37 +00:00
gdr
2ef4d75aa5 changes submitted by Derek Taubert:
resolv.h:  	changed proto of res_mkquery()
	arpa/nameser.h:	added the 'pr' field to the HEADER struct
1997-11-01 19:06:22 +00:00
gdr
f61bb88c0d Initial checkin. This cpp comes from lcc v4.0. 1997-10-30 05:51:13 +00:00
gdr
0e441fea76 initial checkin 1997-10-30 05:47:18 +00:00
gdr
13a3dc63c3 added:
path expansion
	file copying
	GS/OS error printing (unused)
1997-10-30 04:57:25 +00:00
gdr
68e30dd46a Split vfprintf.c into 2 via #ifdefs, so that ORCA/C can create two
different object files.

Added "%b" printf specifier for as per the ORCA/C implementation,
but disable it for now pending an ORCA/C bug.
1997-10-30 04:52:45 +00:00
gdr
88223ca717 added "%b" specifier (Apple IIgs specific) for Pascal-type strings 1997-10-30 04:49:02 +00:00
gdr
2b38da3926 - added rmdir(2)
- eliminate a shitload of casts by using the dynamic gsstring hack
  in <types.h>
1997-10-30 04:46:53 +00:00
gdr
fd08c34074 initial checkin 1997-10-30 04:45:25 +00:00
gdr
9f917c3089 Added Henry Spencer 1997-10-30 04:28:04 +00:00
gdr
63235a6c30 extract release target out to a different file 1997-10-30 04:26:58 +00:00
gdr
81acf39ec5 Add usr.sbin.shk to list of build files 1997-10-30 04:23:37 +00:00
gdr
ef1b203392 add an alias for df so that we don't get the shell builtin. 1997-10-30 04:22:33 +00:00
gdr
4c3a20638e don't puke on pages that are already in GNO's nroff format 1997-10-30 04:21:56 +00:00
gdr
293fc61f14 descu.c:
- eliminate some extraneous whitespace in the database sources

describe.1, descc.8:
	- change database path to /usr/lib/describe.db
1997-10-30 04:19:10 +00:00
gdr
c6e102e916 updated for inclusion in GNO base build 1997-10-30 04:14:21 +00:00
gdr
14a1927519 fixed name of contrib library 1997-10-30 04:06:11 +00:00
gdr
998b53c1c9 modified for inclusion into GNO base build 1997-10-30 04:04:35 +00:00
gdr
0a72bc2794 Added documentation, make 'help' explicitly a gsh script. 1997-10-30 03:51:56 +00:00
gdr
e7015008c4 modified for inclusion in GNO base build 1997-10-30 03:50:04 +00:00
gdr
fbcef9625a modified for inclusion in GNO base build 1997-10-30 03:35:21 +00:00
gdr
e04dacb065 fixed some formatting 1997-10-30 02:34:54 +00:00
gdr
b9c3d5d27d modified to fit into GNO base build 1997-10-30 02:33:49 +00:00
gdr
24b9cda931 fixed a comment 1997-10-30 02:28:49 +00:00
gdr
b5b9abc713 prototyped 1997-10-30 02:18:16 +00:00
gdr
51ae0e883d initial checkin. This is provided for compatibility with old BSD sources 1997-10-30 02:13:59 +00:00
gdr
10f5957592 If __USE_DYNAMIC_GSSTRING__ is #defined prior to the inclusion of
<types.h>, then GSString* and ResultBuf* types will by #defined
to be GSStringPtr and ResultBufPtr, respectively.
1997-10-30 02:13:13 +00:00
gdr
70949ed9a3 Derek's initial changes, with a minor change in whitespace by gdr
to minimize the diffs with the original version.
1997-10-26 18:38:03 +00:00
gdr
fd453f99d5 Initial checkin. Matches 4.4BSD, except that the man page has been
reformated.
1997-10-26 17:12:24 +00:00
gdr
86fc467fac added regex man pages (chap 3 and 7) 1997-10-08 07:09:19 +00:00
gdr
280300e2f8 This now builds under ORCA/C. Completely untested. 1997-10-08 07:07:51 +00:00
gdr
b7b8ffe87b - started building with ORCA/C
- changed OPSHIFT macro to use a (unsigned long) vs (unsigned) cast;
  this at least will compile now; ORCA/C was complaining about 'duplicate
  label in case statement'.
1997-10-08 07:07:14 +00:00
gdr
a5c3c955aa initial checkin 1997-10-08 03:48:16 +00:00
gdr
4f8059fffa added cvs identifier and conditional on system #include 1997-10-07 15:00:23 +00:00
gdr
d54f8f999d initial checkin 1997-10-07 14:58:09 +00:00
gdr
e4e2dd505c initial checkin 1997-10-07 01:43:55 +00:00
gdr
6ec822da35 minor rProgInfo changes 1997-10-05 16:42:03 +00:00
gdr
3f66072e30 initial checkin 1997-10-04 05:24:01 +00:00
gdr
75e4ffde40 Give long name for AT&T UNIX. 1997-10-04 04:40:10 +00:00
gdr
2d9725fc31 Change describe(1) entry to only show the directory, not the full path. 1997-10-04 03:48:09 +00:00
gdr
45975acfd7 added termcap entries 1997-10-03 05:46:31 +00:00
gdr
c4fc6763d1 corrected location 1997-10-03 05:43:39 +00:00
gdr
90573468cb added cvs id 1997-10-03 05:43:22 +00:00
gdr
5578ed663d initial checkin as provided by Evan Day, except for:
- minor reformatting in man page
	- corrected cvs identifiers
1997-10-03 05:42:18 +00:00
gdr
c22bcee941 initial checkin as provided by Evan Day, except for:
- fixed some rcs identifiers
	- fixed location shown in describe entry, makefile
1997-10-03 05:13:23 +00:00
gdr
dd0de285c3 corrected utility location 1997-10-03 05:12:15 +00:00
gdr
e713312837 initial checkin as provided by Evan Day, except for:
- fixed up some rcs identifiers
	- fixed up some formatting in the man page
1997-10-03 05:06:50 +00:00
gdr
8056066083 - initial build for GNO (untested)
- changed some path names
1997-10-03 04:53:06 +00:00
gdr
1c00c49e7b initial checkin 1997-10-03 04:49:40 +00:00
gdr
68bf96eb2a added install and release targets, rez file dependancy 1997-10-03 04:47:34 +00:00
gdr
cbf28ecef3 replaced with a GNO-style makefile 1997-10-03 04:46:02 +00:00
gdr
a669d1f0ac prototyped 1997-10-03 04:45:27 +00:00
gdr
6848d48a2e build libc in the lower level makefiles instead of the top one; we're
getting too many files
1997-10-03 04:44:26 +00:00
gdr
f163b4f2a5 added PHONY target to libc 1997-10-03 04:42:51 +00:00
gdr
ce58eb7e53 - define INSTALL and CATREZ
- change other macros to use "+=" vice "="
1997-10-03 04:39:58 +00:00
gdr
3da53eec64 - added some #include guards
- added a #pragma debug 0 for variadic routines
1997-10-03 04:15:03 +00:00
gdr
53b34aa122 added version number 1997-10-03 04:13:24 +00:00
gdr
b711225944 removed STACK definition; it matches the default 1997-10-03 04:13:06 +00:00
gdr
942e883d2f added cvs identifier 1997-10-03 04:11:06 +00:00
gdr
1f728a69a6 added version number 1997-10-03 04:07:34 +00:00
gdr
1ebcbc2ede added some #include guards 1997-10-03 04:07:20 +00:00
gdr
6fbd0e2248 initial checkin 1997-10-03 04:05:02 +00:00
gdr
91ac68c447 added the version number 1997-10-03 04:00:10 +00:00
gdr
e47488e5d3 added some #include guards 1997-10-03 03:59:41 +00:00
gdr
dbeebca188 added rcs identifiers 1997-10-03 03:58:54 +00:00
gdr
5166f52a4b added version number 1997-10-03 03:57:52 +00:00
gdr
ad2b55ba3a added cvs identifiers 1997-10-03 03:56:35 +00:00
gdr
74ecabee33 changed some #include guards 1997-10-03 03:55:11 +00:00
gdr
1ce49dd801 added dependancies on extern.h 1997-10-03 03:52:54 +00:00
gdr
0c2b571d25 added rcs identifiers 1997-10-03 03:52:26 +00:00
gdr
c6ff8aa083 trivial changes 1997-10-03 03:51:24 +00:00
gdr
9fed90450c added CVS identifier 1997-10-03 03:47:18 +00:00
gdr
fe19a1dddc initial checkin (modified man page) 1997-10-01 02:57:29 +00:00
gdr
c6b6448216 initial checkin 1997-09-30 06:24:04 +00:00
gdr
d5a9505472 initial checkin 1997-09-30 06:00:47 +00:00
gdr
995c2aba83 - added archive of the "verbatim" directory
- made all archive names ProDOS-conformant
1997-09-30 05:35:14 +00:00
gdr
c7a0146f19 - use getopts to parse parameters (so that -av works like -a -v)
- print error messages on stderr instead of stdout
  - change man page to use bold font in a couple of places and add history
  - update other documentation to reflect changes in making catrez
    part of the standard GNO release
  - added test cases in "tests" directory
1997-09-30 05:14:48 +00:00
gdr
22929ce3a8 initial checkin 1997-09-30 05:09:26 +00:00
gdr
822244497a initial checkin 1997-09-30 04:55:26 +00:00
gdr
a7573f4d82 - changed /root to /home/root, given a problem with namespace "partitions"
and home directories (see the "Bugs" section of the FAQ)
- changed /bin/csh to /bin/gsh
1997-09-30 04:54:57 +00:00
gdr
425cdbf614 initial checkin 1997-09-30 04:49:32 +00:00
gdr
595a3dfaea - whereis now takes it's selection of directories from a configuration
file
- added describe entry, rez fork
- merged into GNO base build
1997-09-30 04:22:43 +00:00
gdr
2ad717bf06 initial checkin 1997-09-30 04:01:00 +00:00
gdr
b48ee15e6c updated entries for:
cat, false, head, tail, tar, true, uname, wc, syslog, termcap. lcrypt,
libcurses, lsaneglue, orcalib, sysfloat, init, initd, catrez, copycat,
cut, describe, launch, link, lseg, nroff, whereis, libutil, descc,
descu, mktemp, newuser
1997-09-29 05:36:00 +00:00
gdr
c457aa46ae *** empty log message *** 1997-09-29 05:29:46 +00:00
gdr
713b0b5892 Changes for v1.1-release
- added test suite
1997-09-28 16:41:38 +00:00
gdr
d1faeee771 Changes for v1.1-release
- increased optimization level to -1
	- added -d option
	- changed output format
1997-09-28 16:41:13 +00:00
gdr
e62ed561aa added makefile, rVersion source, describe(1) entry 1997-09-26 06:40:51 +00:00
gdr
b28de25362 replace Makefile with abbreviated version using prog.mk 1997-09-26 06:39:45 +00:00
gdr
a0f5373eac use verUS 1997-09-26 06:39:12 +00:00
gdr
2c2de538ee changed location of prog.mk 1997-09-26 06:36:22 +00:00
gdr
bf5292af8e "lseg" was misspelled 1997-09-26 06:36:01 +00:00
gdr
9d2240afa3 added CVS id string 1997-09-26 06:34:52 +00:00
gdr
55003d4505 changed to use v2.0.6 stack routines 1997-09-26 06:34:37 +00:00
gdr
d52e9de6e8 - changed location of tr(1)
- test.list is not needed
1997-09-26 06:33:40 +00:00
gdr
efd2ee3d99 - added CVS id string
- added stack check routines
- upped version number
1997-09-26 06:32:43 +00:00
gdr
b68786be45 added rVersion and describe(1) sources 1997-09-26 06:31:47 +00:00
gdr
b0623660ef - listed changes for v1.0.2 1997-09-26 06:31:15 +00:00
gdr
7b312c57e5 - replaced full makefile with one for use with the GNO builds 1997-09-26 06:30:33 +00:00
gdr
9dd49d2e54 - minor formatting change 1997-09-26 06:29:55 +00:00
gdr
9354bb33ac - added CVS id string 1997-09-26 06:28:24 +00:00
gdr
2a0f0ad491 - inserted identifier line
- changed to use v2.0.6 stack routines
1997-09-26 06:27:59 +00:00
gdr
b0e785a02a changed location of prog.mk 1997-09-26 06:27:29 +00:00
gdr
0da71455c3 - describe entry wasn't complete 1997-09-26 06:26:06 +00:00
gdr
6fcd3ab994 - changed location of tr(1)
- test.list is not needed
1997-09-26 06:25:23 +00:00
gdr
014dce9114 corrected location of prog.mk 1997-09-26 06:24:35 +00:00
gdr
d81c685a83 - added ident string 1997-09-26 06:23:30 +00:00
gdr
cd3d0ca342 - added ident string
- changed to use v2.0.6 stack routines
1997-09-26 06:22:49 +00:00
gdr
7b916c3c8d - changed tr(1) path in fulltests
- test.list is not needed
1997-09-26 06:21:40 +00:00
gdr
5fc597eb5e changed to use v2.0.6 stack routines 1997-09-26 06:20:06 +00:00
gdr
3cec7d7d1f corrected path of prog.mk 1997-09-26 06:19:35 +00:00
gdr
1b7f428ceb added ident string 1997-09-26 06:19:02 +00:00
gdr
6fd352e14a - fixed tr(1) path in fulltests
- test.list is an unneeded output file
1997-09-26 06:18:10 +00:00
gdr
2274ba187d changed to use the v2.0.6 stack routines 1997-09-26 06:13:46 +00:00
gdr
1799a93f23 this is a test output file, not an input file 1997-09-26 06:13:07 +00:00
gdr
21d1bfc485 changed path to tr(1) 1997-09-26 06:12:23 +00:00
gdr
fbbabf2a0c - increased default optimization from 72 to 78
- increased default stack from 768 to 1024
- make 'release' target depend on program, man page, and describe entry
1997-09-26 06:11:07 +00:00
gdr
f75f7a7b79 added Tilghman Lesher to the list 1997-09-26 06:00:19 +00:00
gdr
6300bcee3a renamed the default database to "/usr/lib/describe.db" 1997-09-26 05:56:54 +00:00
gdr
c9344f452b some more Dave and Devin changes 1997-09-24 06:59:57 +00:00
gdr
8774b23e30 - got binrules.mk, binconst.mk, and prog.mk working together properly
- reduce the number of shell meta characters in recipes
- use catrez instead of copyfork
1997-09-24 06:43:53 +00:00
gdr
f8cc5f9ba2 Changed this file so that one could get function prototypes in effect
by #undef-ing the macros after inclusion of <ctype.h>.
1997-09-24 06:39:23 +00:00
gdr
b00e9eb797 Makefile:
- Renamed from makefile.mk to Makefile.
	- Updated for proper operation as part of GNO build.
	- Discontinue use of vaend.c, basename.c for GNO v2.0.6.

descu:
	- Document ability to specify an output file vice stdout
	  (this feature was already in, but not documented)
	- Allow the output file to be the same name as the first
	  input file (it will be overwritten).
	- Fix buffer overrun bugs that occured when:
		a) There was no initial input file; or
		b) There are no headers in the first input file; or
		c) There are no trailers in the first input file; or
	- Increased SLOTS_QUANTUM from 20 to 64, hopefully increasing
	  the speed on large files.
	- fixed stack check code to use the new routines names
	- put version number in lockstep with descc and describe

descc:
	- descc will now change the database file type to BIN, if it
	  wasn't already so.
	- changed default location of system database
	- fixed stack check code to use the new routines names
	- put version number in lockstep with descu and describe


describe:
	- changed default location of system database
	- fixed stack check code to use the new routines names
	- put version number in lockstep with descu and descc

*.rez:
	- added resource source files
1997-09-24 06:34:59 +00:00
gdr
4da093616e Updated names for stack checking routines. 1997-09-24 06:23:13 +00:00
gdr
a5ad3a71b7 - added CVS identifier
- corrected name and location of prog.mk
- set stack size to 1024 (768 was a bit too low)
1997-09-24 06:21:24 +00:00
gdr
63754dce1c added cvs identifier line 1997-09-24 06:20:22 +00:00
gdr
3b166416a3 cleaned up makefile a bit 1997-09-24 06:18:44 +00:00
gdr
0deb52e606 removed declaration of isblank() 1997-09-24 06:14:46 +00:00
gdr
aa9e477a31 correct location of tr(1) 1997-09-24 06:14:13 +00:00
gdr
a521e64042 initial checkin 1997-09-21 23:13:10 +00:00
gdr
c45d52b90d Added 'release' target. 1997-09-21 22:52:13 +00:00
gdr
c0f36cb502 changed some comments 1997-09-21 22:51:14 +00:00
gdr
b703ce4bd7 Updated list as per Dave's contributions. 1997-09-21 22:47:37 +00:00
gdr
8d7491e9ef *** empty log message *** 1997-09-21 22:46:04 +00:00
gdr
4c8dcc2b1c mostly stdio and optimization-related changes 1997-09-21 22:29:52 +00:00
gdr
42d8290c4a Added some more default rules et al for building utilities. 1997-09-21 22:28:44 +00:00
gdr
d686ae9f02 reformatted source and cleaned up some comments 1997-09-21 22:27:40 +00:00
gdr
6f96d148e5 add /HFSinclude to default search path 1997-09-21 22:24:49 +00:00
gdr
a60a9fc3a2 set /usr/include, /lang/orca/include as default search paths 1997-09-21 22:23:53 +00:00
gdr
645cb5834d tr(1), as contributed by Dave Tribby 1997-09-21 22:20:37 +00:00
gdr
8a461e09b4 cut(1) as contributed by Dave Tribby 1997-09-21 22:19:59 +00:00
gdr
a739102c3a fmt, as modified after using insight(1) at Myrias. There is some
architecture-specific code added.
1997-09-21 22:12:27 +00:00
gdr
5ea6ce9244 catrez v1.0.1 as contributed by Dave Tribby 1997-09-21 22:08:32 +00:00
gdr
712ad8b00d lseg v1.1 as contributed by Dave Tribby. Some files had an RCS identifier
added.
1997-09-21 22:06:43 +00:00
gdr
5fd930582d lseg 1.1 (beta) as contributed by Dave Tribby. Some files had an RCS
identifier added.
1997-09-21 22:05:59 +00:00
gdr
f6efe9ae26 lseg version 1.0, as provided by Jawaid for GNO v2.0.4 1997-09-21 21:59:33 +00:00
gdr
cd0695c010 added location for ORCA library sources 1997-09-21 21:52:19 +00:00
gdr
09da0614d3 - added RCS Id string to header file
- added makeinstall target to Makefile
- added man page
- added mkso.data file
1997-09-21 21:51:03 +00:00
gdr
d671eaa752 initial checkin 1997-09-21 18:11:42 +00:00
gdr
7a88871b21 corrected target for .PRECIOUS attribute 1997-09-21 18:06:07 +00:00
gdr
124ca8d9b7 - added assert test
- changed location of included files
1997-09-21 17:54:27 +00:00
gdr
5d0fd14e43 initial checkin 1997-09-21 17:46:05 +00:00
gdr
39aff4d07f - added a test description
- removed #ifdefs that would use fopen vice fdopen
1997-09-21 16:36:18 +00:00
gdr
a54e2a8e91 update build list 1997-09-21 16:35:12 +00:00
gdr
db4bce6e93 - send status msgs to stderr vice stdout
- ensure that the user specified a flag, else popen will get a NULL mode
  parameter
1997-09-21 16:33:49 +00:00
gdr
314f3fcee0 initial checkin 1997-09-21 16:32:15 +00:00
gdr
91a111f2c1 added .... change descriptions. 1997-09-21 16:31:12 +00:00
gdr
c3d9c3b245 - add Procyon and Mike W. to the list 1997-09-21 16:28:57 +00:00
gdr
7050dc895b - link in assert.a from the ORCALib directory
- depend on lower level makefiles to update libc; don't search their
  directories
1997-09-21 16:28:30 +00:00
gdr
6471a77b16 allow lower level makefiles to update libc 1997-09-21 16:22:23 +00:00
gdr
fc58ca13eb - because of a bug in the kernel, force fcntl to return O_RDWR for
flags on a FIFO or character-special device.
- for variadic routines, up the optimization from 72 to 78.  Otherwise
  remove #pragmas and depend on the makefile to set them
- move raise(3) into ORCALib implementation so that we can avoid backward
  references in linking.
1997-09-21 16:21:13 +00:00
gdr
92d0985f19 delete #pragmas, when possible; depend on them being set by the makefile 1997-09-21 16:17:20 +00:00
gdr
de72cff25b - set optimization level to 78
- have the default target update ../libc
1997-09-21 16:15:29 +00:00
gdr
228ac9913d - move optimization directives from the source files to the makefile
- have the default makefile target update ../libc
1997-09-21 06:23:08 +00:00
gdr
997c35962d initial checkin 1997-09-21 06:22:10 +00:00
gdr
ffae6366ab - specify optimization level 78
- have default target update ../libc
1997-09-21 06:21:35 +00:00
gdr
e9b7d50bfc remove #pragmas; depend on Makefile for these settings 1997-09-21 06:21:07 +00:00
gdr
a5c0ecf161 add a segment statement 1997-09-21 06:20:37 +00:00
gdr
82170164bc - build vfprintf.o in two stages in order to avoid an ORCA/C preprocessor bug
- specify, on the command line, an optimization leve of 78 for all source
  files
- have the default target update ../libc
1997-09-21 06:19:50 +00:00
gdr
6e22587191 - remove #line numbers inserted by splatprep(1)
- [variadic functions only] update optimization level from 72 to 78
1997-09-21 06:16:12 +00:00
gdr
c52fcd3475 greatly reduce stack requirements of vfprintf() and __sbprintf() 1997-09-21 06:14:42 +00:00
gdr
a071932b06 - specify optimization level 78 in makefile
- have default target update ../libc
1997-09-21 06:10:26 +00:00
gdr
a402a7f7fa - set optimization level 78 in makefile
- have default target update ../libc
1997-09-21 06:08:48 +00:00
gdr
f6a8741209 move #pragma's out of source when possible (depend on makefile) 1997-09-21 06:08:11 +00:00
gdr
8f24a49223 Move #pragmas out of the source files when possible. Depend on occ
command line flags.
1997-09-21 06:05:01 +00:00
gdr
b94726dc62 reimplement and fix popen/pclose routines 1997-09-21 06:04:01 +00:00
gdr
1554cedb32 initial checkin 1997-09-21 06:02:56 +00:00
gdr
740fda6275 changes to reflect that the paths.mk info is now in a separate file 1997-09-21 06:01:12 +00:00
gdr
4539811926 add logwtmp.c to the build 1997-09-21 05:59:14 +00:00
gdr
e64c17d8cb move the #pragmas out of the source files; depend on the Makefile 1997-09-21 05:57:40 +00:00
gdr
45e13e9ddb initial checkin 1997-09-19 15:47:55 +00:00
gdr
02b72767b3 Added BUG entry mentioning occasional hangs of gsh. 1997-09-19 15:47:03 +00:00
gdr
a689e9398c added many more entries, mostly from stdio routines 1997-09-19 15:46:10 +00:00
gdr
c1a44d4166 - initial checkin, as submitted by Soenke Behrens 1997-09-17 16:36:41 +00:00
gdr
39e6f0d5ee - initial checkin, as submitted by Dave Tribby 1997-09-17 06:31:15 +00:00
gdr
fef1481080 - initial checkin, as submitted by Dave Tribby
- renamed makefile.mk to Makefile
1997-09-17 06:31:06 +00:00
gdr
64cc71f1af - initial checkin, as submitted by Dave Tribby 1997-09-17 06:24:29 +00:00
gdr
590e077340 - initial checkin, as submitted by Dave Tribby
- renamed makefile.mk to Makefile
1997-09-17 06:24:18 +00:00
gdr
fb3ab1728f - initial checkin as submitted by Dave Tribby 1997-09-17 05:44:00 +00:00
gdr
0acddc1899 - initial checkin as submitted by Dave Tribby
- renamed makefile.mk to Makefile
1997-09-17 05:43:50 +00:00
gdr
c1fa42d03c - initial checkin, as received from Dave Tribby 1997-09-17 05:29:33 +00:00
gdr
0cd26df27a - initial checkin, as received from Dave Tribby
- renamed makefile.mk to Makefile
1997-09-17 05:29:24 +00:00
gdr
2ff5e0d02e added various stdio man pages 1997-09-16 00:11:30 +00:00
gdr
e97849195e initial checkin 1997-09-16 00:10:45 +00:00
gdr
82cd20e3c4 Mention that the file will still exist if one attempts to unlink it while
it is open.
1997-09-16 00:10:13 +00:00
gdr
3f4a6ce10a fixed a typo 1997-09-15 19:15:26 +00:00
gdr
9b28500b58 Initial checkin: Same as ORCA/C version, but with isblank() added. 1997-09-05 15:42:26 +00:00
gdr
eb65e1bf12 added various files to libc; mostly stdio 1997-09-05 06:50:30 +00:00
gdr
4fead8bdd0 minor comment changes 1997-09-05 06:48:12 +00:00
gdr
b1b7a26b51 added some tests 1997-09-05 06:46:33 +00:00
gdr
7fad7d2bd6 - added non-ORCA rename(2) implementation
- added sigprocmask(2)
- changed unlink(2) not to depend on remove(3) [was briefly mutually
	recursive]
- added fcntl(2)
1997-09-05 06:38:06 +00:00
gdr
2dafe3f23e depend on paths.mk 1997-09-05 06:35:22 +00:00
gdr
24747d92a2 uncommented "mend" on assertVersion macro 1997-09-05 06:34:59 +00:00
gdr
93e9864555 Move strerror() implementation to this directory. 1997-09-05 06:33:22 +00:00
gdr
05cc2bfd4c Added _isnan(), _isinf(), __dtoa(), fcvt(), and ecvt() routines. The
first three are required by stdio.
1997-09-05 06:31:59 +00:00
gdr
123ac5dd20 change segment name to "libc_stdio" 1997-09-05 06:27:50 +00:00
gdr
5c7af603fd Replace ORCALib stdio implementation with BSD implementation. 1997-09-05 06:18:52 +00:00
gdr
ca13d459c1 depend on paths.mk 1997-09-05 06:15:49 +00:00
gdr
4fe75a5912 Map GS/OS error "file busy" (0x50) to EEXIST for open(2). 1997-09-05 06:14:16 +00:00
gdr
8a35779079 depend on ../../paths.mk 1997-09-05 06:12:22 +00:00
gdr
1fd1b2b9dd psignal.c:
Use CR instead of LF in call to write(2).

Makefile:
	Depend on ../../paths.mk

basename.c:
	Include <sys/syslimits.h> due to change in stdio.h
1997-09-05 06:09:50 +00:00
gdr
9002791e1c - replaced modified ORCA stdio.h with modified BSD version
- new sane.h to match lsaneglue
- new math.h.  Based on ORCA version, but added _isnan() and _isinf()
1997-09-05 05:54:01 +00:00
gdr
42ccbe7f76 added F_GETFL flag 1997-09-05 05:52:28 +00:00
gdr
f4e07c47c7 - assigned lseg to Dave
- added catrez to the list; used for builds
1997-09-05 05:07:37 +00:00
gdr
3b74d54927 removed __ORCAC_VERSION 1997-09-04 15:49:31 +00:00
gdr
1f006da069 Added:
-----
INSTALL		start of installation notes
new.syscalls	listing of new system calls.
status.bin	status of base utilities
1997-08-08 05:11:14 +00:00
gdr
6a8369544e added "validity of pathnames" comment
removed perror implementation and trap.asm concheck comments
1997-08-08 05:09:51 +00:00
gdr
353efc72a2 changed: fts* routines, fdopen, ctype listings, siglist variables 1997-08-08 05:06:45 +00:00
gdr
5c4edbc8bf Added makefile, describe(1) source, resource source. 1997-08-08 04:45:41 +00:00
gdr
b0cfaf1892 initial checkin 1997-08-08 04:44:13 +00:00
gdr
397a3206ab initial checkin 1997-08-07 05:17:22 +00:00
gdr
c91fd8439c add date to version line 1997-08-02 21:21:51 +00:00
gdr
86337db335 Checkin of v1.1.5:
- Changed source slightly to compile under djgpp (MS-DOS) and Linux,
	  linted source.
	- Unix makefile changed by Devin Reade to automatically detect OS
	  type.
	- Apple IIgs source now opens files with "r+b" instead of "rwb"
1997-08-02 21:09:13 +00:00
gdr
316b9588e8 initial checkin. Kind of stupid for now. 1997-08-02 20:49:21 +00:00
gdr
54c0bfff3a Initial checkin, matching 4.4BSD (v2.1.5) 1997-08-02 20:15:14 +00:00
gdr
3ebed65a1d Added /etc/group and /etc/passwd files. 1997-07-29 05:35:43 +00:00
gdr
7e092ea691 Added the ChangeLog for libc. 1997-07-28 03:17:41 +00:00
gdr
59a20690fa added psignal,c, siglist.c to build 1997-07-28 03:15:55 +00:00
gdr
e7714c1ecb added psignal(3), sys_siglist, sys_signame. 1997-07-28 03:12:37 +00:00
gdr
b08bb195e2 Changed NSIG to 32 vice 31; sys_siglist is a character array from zero
to 31, inclusive.
1997-07-28 02:55:56 +00:00
gdr
4bbf412f5a added entries for the queue(3) macros, psignal, exec*, and chdir routines. 1997-07-28 02:23:03 +00:00
gdr
f0707a835e Documented that chmod(2) will change a file of type TXT or SRC to a
shell script if the S_IXUSR flag is set.
1997-07-28 02:18:09 +00:00
gdr
143032a94c added queue(3), psignal(3) man pages 1997-07-28 01:58:03 +00:00
gdr
8c5cc88bbb - don't use the _gno_ prefix for sys_nerr or sys_errlist any more
- changed some formatting in the source file
1997-07-28 00:20:37 +00:00
gdr
62becc2887 added fts* routines and fdopen(3) to build 1997-07-27 23:59:49 +00:00
gdr
d85acdda0e added a test for running scripts directly 1997-07-27 23:58:57 +00:00
gdr
44802413cf added three tests 1997-07-27 23:50:59 +00:00
gdr
945f94e0e0 added test for opening a file more than once 1997-07-27 23:45:04 +00:00
gdr
51bdc8eddb updated makefile to contain all checked-in tests 1997-07-27 23:44:39 +00:00
gdr
bc4d7f5de5 Added tests for wait(2) [currently failing] and getpid(2) [currently passing]. 1997-07-27 23:36:25 +00:00
gdr
6b10135a2c Fixed a bug in this test; the VERSION_TRIPLE macro was always getting 0x204. 1997-07-27 23:34:49 +00:00
gdr
8f991e5d98 syscall.c:
Added chmod(2), fchmod(2).

syscall.c, trap.asm, trap.mac:
	Added checks for kernel version.  This is currently disabled due
	to concerns about the overhead involved.  See the gno-devel mailing
	list archives for details.
1997-07-27 23:33:36 +00:00
gdr
9b450f3e72 Added an fdopen(3) implementation. It's not yet working quite right. 1997-07-27 23:15:09 +00:00
gdr
c2791150e8 Add in header comments, delete test case (moved to test directory). 1997-07-27 23:13:28 +00:00
gdr
e0139fb829 Now that ORCALib can be modified, don't prefix sys_errlist and sys_nerr
with "_gno_".
1997-07-27 23:10:57 +00:00
gdr
10ea6a13be add fdopen.c to build 1997-07-27 23:09:09 +00:00
gdr
bc0a3deceb add fts* routines to build 1997-07-27 23:06:00 +00:00
gdr
649a34d2fd - change segment name
- specify optimization, debugging, memorymodel levels
- use <fts.h> vice "fts.h"
- allow GNO version to use fchdir(3)
1997-07-27 23:05:04 +00:00
gdr
a4ebb50d01 Added Dave Tribby, James Brookes to the list. 1997-07-27 22:47:59 +00:00
gdr
b6857812c9 initial checkin 1997-05-12 05:02:03 +00:00
gdr
da9cc85bc1 added fgetln.c to build 1997-05-03 19:40:45 +00:00
gdr
c6828d9ec1 Initial compile under linux. Not yet tested 1997-05-03 19:37:53 +00:00
gdr
796a6ac638 added entries for fdopen(3) and freopen(3) 1997-05-03 18:55:16 +00:00
gdr
de9483865e added fgetln(3) and fopen(3) man pages -- the latter for fdopen(3) 1997-05-03 18:53:24 +00:00
gdr
d9405536ea added histedit.h -- interface for libedit.a 1997-04-28 04:55:49 +00:00
gdr
5b657fd55a Initial checkin of libedit. This is straight from the 4.4BSD v2.1.5 CDROM 1997-04-16 04:58:54 +00:00
2025 changed files with 303381 additions and 5802 deletions

112
Makefile Normal file
View File

@ -0,0 +1,112 @@
#
# 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.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
UDL = /usr/local/bin/udl
NULIB = /usr/local/bin/nulib
XFER_LIST= \
$(XFER)/HFSinclude.shk \
$(XFER)/NOTES.shk \
$(XFER)/bin.shk \
$(XFER)/build.tools.shk \
$(XFER)/include.shk \
$(XFER)/lib.shk \
$(XFER)/orcacdefs.shk \
$(XFER)/root.shk \
$(XFER)/sbin.shk \
$(XFER)/usr.bin.shk \
$(XFER)/usr.orcabin.shk \
$(XFER)/usr.man.shk \
$(XFER)/usr.sbin.shk \
$(XFER)/verbatim.shk
NOT_YET= \
$(XFER)/libexec.shk \
$(XFER)/sys.shk \
$(XFER)/usr.sbin.shk
srcxfer: $(XFER_LIST)
ROOTFILES = Makefile binconst.mk binrelease.mk binrules.mk paths.mk prog.mk
$(XFER)/root.shk: $(ROOTFILES)
@echo "making $@"; \
$(RM) -f $@; \
[ -d $(XFER) ] || mkdir -p $(XFER); \
if [ -d $(TMP) ]; then \
echo "$(TMP) exists. Aborted"; \
exit 1; \
fi; \
cwd=`pwd`; \
mkdir -p $(TMP); \
cp -r -p $(ROOTFILES) $(TMP); \
$(RM) -rf `find $(TMP) -name CVS -print `; \
$(UDL) -gR $(TMP); \
(cd $(TMP); $(NULIB) -cf $$cwd/$@ $(ROOTFILES) ); \
$(RM) -rf $(TMP)
# make sure the filename fits
$(XFER)/usr.orcabin.shk: $(XFER)/usr.orca.bin.shk
mv $< $@
# .PHONY: $(XFER_LIST)
$(XFER)/%.shk:
@echo "making $@"; \
$(RM) -f $@; \
[ -d $(XFER) ] || mkdir -p $(XFER); \
if [ -d $(TMP) ]; then \
echo "$(TMP) exists. Aborted"; \
exit 1; \
fi; \
mkdir -p $(TMP); \
cp -r -p $* $(TMP); \
$(RM) -rf `find $(TMP) -name CVS -print `; \
$(UDL) -gR $(TMP); \
(cd $(TMP); $(NULIB) -cf $*.shk $*); \
mv $(TMP)/$*.shk $(XFER); \
$(RM) -rf $(TMP)
# /bin/true $*;

23
NOTES/INSTALL Normal file
View File

@ -0,0 +1,23 @@
$Id: INSTALL,v 1.1 1997/08/08 05:11:14 gdr Exp $
Installing the Binaries-Only Version
====================================
Make a copy of your disks.
Make a copy of the GNO distribution disks and keep the originals in
a safe place. Never modify the original disks; only modify copies.
Define your destination directories.
Using any text editor, edit the file /gno.disk1/installbin. In
that file you will find the shell variables VOL1, VOL2, VOL3
and VOL4. You should change the values of these variables
to volume or directory names that exist at your site.
While the distributed script used the same directory for
all of VOL1 (/), VOL2 (/usr), and VOL3 (/home), I recommend
placing them on different partitions if possible, especially
the first two. This is because, as you add more things to
GNO, the / and /usr partitions will (likely) eventually use
up most of a 32Meg ProDOS partition.

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,90 +0,0 @@
*******
* soon
*
* $Id: TO.DO,v 1.1 1997/02/28 05:42:26 gdr Exp $
*
*******
Use result of _setModeEmulation(3) in appropriate calls. These include
chmod -
creat - done
open - done
stat - unnecessary
fstat - unnecessary
lstat - unnecessary
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.
*******
* remove from / replace in Orcalib
*******
strerror orcalib/string.asm
perror orcalib/stdio.a
sys_errlist orcalib/stdio.a problem
sys_nerr orcalib/vars.a problem
*******
* defer
*******
libc/stdio/perror.c:
use BSDish implementation for perror(3) to avoid stdio.
libc/sys/syscall.c:
for unlink, if file is open, then register a call to unlink
(non-recursive) the file via atexit(3)
libc/sys/trap.asm:
Insert conchecks in trap functions to check to see if GNO
is active and at the right version level. If not, they
should abort.
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
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.

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,12 +1,68 @@
*******
* soon
*
* $Id: TO.DO,v 1.1 1997/02/28 05:42:26 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
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.
Add implementations for Tilghman:
strftime(3)
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
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.
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
@ -33,30 +89,41 @@ libc/sys/exec.c:
These functions should operate closer to GS/OS when possible.
Also need to reduce stack requirements.
*******
* remove from / replace in Orcalib
*******
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
strerror orcalib/string.asm
perror orcalib/stdio.a
sys_errlist orcalib/stdio.a problem
sys_nerr orcalib/vars.a problem
*******
* defer
*******
libc/stdio/perror.c:
use BSDish implementation for perror(3) to avoid stdio.
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)
libc/sys/trap.asm:
Insert conchecks in trap functions to check to see if GNO
is active and at the right version level. If not, they
should abort.
[not practical?]
libc/gen/environ.c:
Review routines. Force them to use GSString routines, reduce
@ -78,6 +145,8 @@ do intro man pages:
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

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

439
NOTES/status.bin Normal file
View File

@ -0,0 +1,439 @@
*************************************************************************
* *
*** 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 $ *
* *
*************************************************************************
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")
-------------------------------------
%%%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
----------
Program - Name of the program.
204 - 'Y' if it was part of the base v2.0.4 distribution.
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.
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). '[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', '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.
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 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
/bin/csh
/bin/date Y Y mober Y # uploaded to mail distrib on trenco
/bin/dd
/bin/df N Y evan Y T Y Y Y RI
/bin/domainname
/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 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 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 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 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 . -
/etc/ttys Y Y Y . -
/etc/utmp . . . . . . . . . (mu)
/gshrc Y Y
/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
/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 N Y gdr Y T Y Y Y
/libexec/atrun . . sr
/libexec/fingerd
/libexec/ftpd N Y dt
/libexec/rexecd
/libexec/rlogind
/libexec/rshd
/libexec/talkd N Y dt
/libexec/telnetd
/libexec/uucpd
/sbin/dump N Y dt
/sbin/dumpfs
/sbin/fsck
/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 N Y gdr Y T Y Y Y RI
/startinst Y
/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 . . 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 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 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 N . gdr # sr working on GS-specific implementation
/usr/bin/finger
/usr/bin/flex Y N
/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 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 RI
/usr/bin/hexdump
/usr/bin/install N Y gdr Y T Y Y Y RI
/usr/bin/join
/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 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 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 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 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 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 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 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 N Y dt
/usr/bin/telnet N Y dt
/usr/bin/tftp
/usr/bin/tset
/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 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 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 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
/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/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 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 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 - - - - -
/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)
%%%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
/usr/local/bin/valspeak
/usr/local/bin/ssplay
/usr/lang/bin/xlisp
The following are the files as the user sees them "shipped":
/gno.disk1/kern
/gno.disk1/gsh
/gno.disk1/installbin
/gno.disk1/mkso
/gno.disk1/dev/null
/gno.disk1/usr/bin/install
/gno.disk1/usr/bin/yankit
/gno.disk2/dev.shk
/gno.disk2/include.shk
/gno.disk3/usr.man.shk

View File

@ -1,4 +1,4 @@
$Id: status.lib,v 1.1 1997/02/28 05:42:27 gdr Exp $
$Id: status.lib,v 1.9 2012/08/26 02:54:58 gdr Exp $
Key for Code Status column:
R == reviewed
@ -10,6 +10,9 @@ resides. If it is blank, it is not yet written. "2U" indicates
undocumented system calls in undocumented.2. If these should be documented,
Derek, please write a man page for them or tell me what should be in there.
Letters in square brackets ("[]") following function names indicate
that you should read the respective note following this table.
function file code man header
status page
======================================================================
@ -23,16 +26,30 @@ GOchange libc/gno/gsstring.c T 3 gno/gno.h
GOfree libc/gno/gsstring.c T 3 gno/gno.h
GOinit libc/gno/gsstring.c T 3 gno/gno.h
InstallNetDriver libc/sys/trap.asm C 2U gno/gno.h
LC_CopyFile libcontrib/copyfile.c T contrib.h
LC_CopyFileGS libcontrib/copyfile.c T contrib.h
LC_ExpandPath libcontrib/expandpath.c T contrib.h
LC_ExpandPathGS libcontrib/expandpath.c T contrib.h
LC_StringArrayAdd libcontrib/strarray.c T contrib.h
LC_StringArrayDelete libcontrib/strarray.c T contrib.h
LC_StringArrayClear libcontrib/strarray.c T contrib.h
LC_StringArrayCat libcontrib/strarray.c T contrib.h
LC_StringArrayNew libcontrib/strarray.c T contrib.h
LC_xmalloc libcontrib/xalloc.c T contrib.h
LC_xrealloc libcontrib/xalloc.c T contrib.h
LC_xstrdup libcontrib/xalloc.c T contrib.h
SetGNOQuitRec libc/sys/trap.asm C 2U gno/gno.h
WriteGString libc/gno/gnomisc.c
WriteGString libc/gno/gnomisc.c C
__C2GS libc/gno/gsstring.c C 3 gno/gno.h
__C2GSMALLOC libc/gno/gsstring.c T 3 gno/gno.h
__GS2C libc/gno/gsstring.c C 3 gno/gno.h
__GS2CMALLOC libc/gno/gsstring.c C 3 gno/gno.h
__prognameGS libc/gno/gnomisc.c T 3 gno/gno.h
_assertStack libc/gno/stack2.c T 3 gno/gno.h
_beginStackCheck libc/gno/stack.asm T 3 gno/gno.h
_endStackCheck libc/gno/stack.asm T 3 gno/gno.h
_errnoText [var] libc/stdio/perror.c T na na
_getMinStack libc/gno/stack.asm T 3 gno/gno.h
_getModeEmulation libc/sys/map.c T 3 gno/gno.h
_mapErr libc/gno/map.c T 3 gno/gno.h
_mapMode2GS libc/gno/map.c T 3 gno/gno.h
@ -48,6 +65,8 @@ buildPath libc/sys/exec.c C 3 gno/gno.h
environInit libc/gen/environ.c T 3 stdlib.h
environPop libc/gen/environ.c T 3 stdlib.h
environPush libc/gen/environ.c T 3 stdlib.h
fsetbinary (macro) T 3 stdio.h
fsettext (macro) T 3 stdio.h
isRootPath libc/sys/exec.c C 3 gno/gno.h
kernStatus (inline) T 2 gno/gno.h
kernVersion (inline) T 2 gno/gno.h
@ -57,20 +76,29 @@ 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
BSD-ish
-------
__crypt_f libc/gen/crypta.asm C na na
__crypt_rotate libc/gen/crypta.asm C na na
__crypt_transpose libc/gen/crypta.asm C na na
__mb_cur_max [var] libc/locale/table.c C stdlib.h
__srget libc/stdio/rget.c C na stdio.h
__svfscanf libc/stdio/vfscanf C na stdio.h
__swbuf libc/stdio/wbuf.c C na stdio.h
_execve libc/sys/trap.asm C 2 unistd.h
_getlogin libc/gen/getlogin.c T na unistd.h
_getpgrp libc/sys/trap.asm C 2 unistd.h
_longjmp libc/gen/setjmp.asm C 3 setjmp.h
_setjmp libc/gen/setjmp.asm C 3 setjmp.h
@ -78,19 +106,22 @@ accept libc/sys/trap.asm C 2 sys/socket.h
access libc/sys/syscall.c C 2 unistd.h
alarm libc/sys/trap.asm C 2 unistd.h
alarm10 libc/sys/trap.asm C 2 unistd.h
alphasort libc/gen/scandir.c T 3 dirent.h
alphacasesort libc/gen/scandir.c T 3 dirent.h
alphasort libc/gen/scandir.c T 3 dirent.h
basename libc/gen/basename.c T 3 unistd.h
bcopy libc/gen/bmem.c C 3 string.h
bind libc/sys/trap.asm C 2 sys/socket.h
bzero libc/gen/bmem.c C 3 string.h
chdir libc/sys/syscall.c C 3 unistd.h
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
ctermid libc/stdio/ stdio.h
dirfd (macro) T 3 dirent.h
dirname libc/gen/basename.c T 3 unistd.h
dup libc/sys/trap.asm C 2 unistd.h
@ -109,13 +140,46 @@ execv libc/sys/exec.c T 3 unistd.h
execve libc/sys/exec.c T 3 unistd.h
execvp libc/sys/exec.c T 3 unistd.h
fchdir libc/sys/syscall.c C 3 unistd.hf
fchmod libc/sys/syscall.c C 2 sys/stat.h
fclose libc/stdio/fclose.c T(1) 3 stdio.h
fcntl libc/sys/syscall.c T 2 sys/fcntl.h
fdopen libc/stdio/fdopen.c T 3 stdio.h
feof libc/stdio/feof.c C 3 stdio.h
ferror libc/stdio/ferror.c C 3 stdio.h
fflush libc/stdio/fflush.c C 3 stdio.h
fgetc libc/stdio/fgetc.c C 3 stdio.h
fgetln libc/stdio/fgetln.c C 3 stdio.h
fgetpos libc/stdio/fgetpos.c C 3 stdio.h
fgets libc/stdio/fgets.c C 3 stdio.h
fileno libc/stdio/fileno.c C 3 stdio.h
fnmatch libc/gen/fnmatch.c T 3 fnmatch.h
fopen libc/stdio/fopen.c C 3 stdio.h
fork libc/sys/trap.asm C 2 unistd.h
fork2 libc/sys/trap.asm C 2 unistd.h
forkpty [A] libutil/pty.c libutil.h
fprintf libc/stdio/fprintf.c C 3 stdio.h
fpurge libc/stdio/fpurge.c C 3 stdio.h
fputc libc/stdio/fputc.c C 3 stdio.h
fputs libc/stdio/fputs.c C 3 stdio.h
fread libc/stdio/fread.c T(1) 3 stdio.h
freopen libc/stdio/freopen.c C 3 stdio.h
fscanf libc/stdio/fscanf.c C 3 stdio.h
fseek libc/stdio/fseek.c C 3 stdio.h
fsetpos libc/stdio/fsetpos.c C 3 stdio.h
fstat libc/sys/trap.asm C 2 sys/stat.h
fstatfs libc/sys/syscall.c C 2 sys/mount.h
fsync libc/sys/syscall.c C 2 unistd.h
ftell libc/stdio/ftell.c C 3 stdio.h
ftruncate libc/sys/syscall.c C 2 unistd.h
fts_children libc/gen/fts.c R 3 fts.h
fts_close libc/gen/fts.c R 3 fts.h
fts_open libc/gen/fts.c R 3 fts.h
fts_read libc/gen/fts.c R 3 fts.h
fts_set libc/gen/fts.c R 3 fts.h
funopen libc/stdio/funopen.c T 3 stdio.h
fwrite libc/stdio/fvwrite.c T(1) 3 stdio.h
getc libc/stdio/getc.c C 3 stdio.h
getchar libc/stdio/getchar.c C 3 stdio.h
getcwd libc/gen/getcwd.c T 3 unistd.h
getdtablesize libc/sys/syscall.c C 2 unistd.h
getegid libc/sys/trap.asm C 2 unistd.h
@ -126,6 +190,7 @@ getgrent libc/gen/getgrent.c T 3 grp.h
getgrgid libc/gen/getgrent.c T 3 grp.h
getgrnam libc/gen/getgrent.c T 3 grp.h
gethostname libc/gen/hostname.c C 3 unistd.h
getlogin libc/gen/getlogin.c T 2 unistd.h
getopt libc/stdlib/getopt.c C 3 stdlib.h
getopt_restart libc/stdlib/getopt.c C 3 stdlib.h
getpass libc/gen/getpass.c C 3 unistd.h
@ -136,6 +201,7 @@ getppid libc/sys/trap.asm C 2 unistd.h
getpwent libc/gen/getpwent.c T 3 pwd.h
getpwnam libc/gen/getpwent.c T 3 pwd.h
getpwuid libc/gen/getpwent.c T 3 pwd.h
gets libc/stdio/gets.c C 3 stdio.h
getsockname libc/sys/trap.asm C 2 sys/socket.h
getsockopt 2 sys/socket.h
getsubopt libc/stdlib/getsubopt.c C 3 stdlib.h
@ -143,6 +209,7 @@ gettimeofday libc/sys/syscall.c C 2 sys/time.h
getttyent libc/gen/getttyent.c C 3 ttyent.h
getttynam libc/gen/getttyent.c C 3 ttyent.h
getuid libc/sys/trap.asm C 2 unistd.h
getw libc/stdio/getw.c C 3 stdio.h
getwd libc/gen/getcwd.c T 3 unistd.h
group_from_gid libc/gen/pwcache.c C 3 na
gtty libc/gen/compat.c C 3 sgtty.h
@ -159,6 +226,11 @@ kvmgetproc libc/sys/trap.asm C 2U gno/gno.h
kvmnextproc libc/sys/trap.asm C 2U gno/gno.h
kvmsetproc libc/sys/trap.asm C 2U gno/gno.h
listen libc/sys/trap.asm C 2 sys/socket.h
localeconv (locale.h)
login libutil/login.c C na libutil.h
login_tty libutil/logintty.c C na libutil.h
logout [B] libutil/logout.c na libutil.h
logwtmp [B, C] libutil/logwtmp.c na libutil.h
longjmp libc/gen/setjmp.asm C 3 setjmp.h
lseek libc/sys/syscall.c C 2 unistd.h
lstat libc/sys/trap.asm C 2 sys/stat.h
@ -167,7 +239,8 @@ 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
optind [var] libc/stdlib/getopt.c C 3 stdlib.h
@ -185,29 +258,47 @@ pipe libc/sys/trap.asm C 2 unistd.h
popen libc/gen/popen.c C 3 stdio.h
preceive libc/sys/trap.asm C 2 sys/ports.h
preset libc/sys/trap.asm C 2 sys/ports.h
printf libc/stdio/printf.c C 3 stdio.h
procreceive libc/sys/trap.asm C 2 gno/gno.h
procrecvclr libc/sys/trap.asm C 2 gno/gno.h
procrecvtim libc/sys/trap.asm C 2 gno/gno.h
procsend libc/sys/trap.asm C 2 gno/gno.h
psend libc/sys/trap.asm C 2 sys/ports.h
psignal libc/gen/psignal.c R 3 signal.h
putc libc/stdio/putc.c C 3 stdio.h
putchar libc/stdio/putchar.c C 3 stdio.h
putenv libc/gen/environ.c T 3 stdlib.h
puts libc/stdio/puts.c C 3 stdio.h
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
regcomp libc/regex/regcomp.c T 3 regex.h
regerror libc/regex/regerror.c T 3 regex.h
regexec libc/regex/regexec.c T 3 regex.h
regfree libc/regex/regfree.c T 3 regex.h
remove libc/stdio/remove.c C 3 stdio.h
rename libc/sys/syscall.c T 2 stdio.h
rewind libc/stdio/rewind.c T(1) 3 stdio.h
rewinddir libc/gen/dirent.c T 3 dirent.h
rindex libc/string/str.c C 3 string.h
rmdir libc/sys/syscall.c T 2 unistd.h
scandir libc/gen/scandir.c T 3 dirent.h
scanf libc/stdio/scanf.c C 3 stdio.h
scount libc/sys/trap.asm C 2 gno/gno.h
screate libc/sys/trap.asm C 2 gno/gno.h
screate libc/sys/trap.asm T 2 gno/gno.h
sdelete libc/sys/trap.asm C 2 gno/gno.h
seekdir libc/gen/dirent.c T 3 dirent.h
select libc/sys/trap.asm C 2 unistd.h
send libc/sys/trap.asm C 2 sys/socket.h
sendmsg ( missing from kernel ) 2 sys/socket.h
sendto libc/sys/trap.asm C 2 sys/socket.h
setbuf libc/stdio/setbuf.c C 3 stdio.h
setbuffer libc/stdio/setbuffer.c C 3 stdio.h
setegid libc/sys/trap.asm C 2 unistd.h
setenv libc/gen/environ.c T 3 stdlib.h
seteuid libc/sys/trap.asm C 2 unistd.h
@ -217,10 +308,14 @@ setgroupent libc/gen/getgrent.c T 3 grp.h
sethostname libc/gen/hostname.c C 3 unistd.h
setjmp libc/gen/setjmp.asm C 3 setjmp.h
setkey libc/gen/crypt.c C 3 unistd.h
setlogmask libc/gen/syslog.asm C 3 sys/syslog.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.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
setproctitle [A] libutil/setproc.c libutil.h
setpwent libc/gen/getpwent.c T 3 pwd.h
setregid libc/sys/trap.asm C 2 unistd.h
setreuid libc/sys/trap.asm C 2 unistd.h
@ -230,17 +325,22 @@ setsockopt libc/sys/trap.asm C 2 sys/socket.h
settimeofday 2 sys/time.h
setttyent libc/gen/getttyent.c C 3 ttyent.h
setuid libc/sys/trap.asm C 2 unistd.h
setvbuf libc/stdio/setvbuf.c C 3 stdio.h
shutdown libc/sys/trap.asm C 2 sys/socket.h
sigblock libc/sys/trap.asm C 2 signal.h
siglongjmp 3 setjmp.h
sigmask (macro) C 2 sys/signal.h
signal libc/sys/trap.asm C 2 sys/signal.h
sigpause libc/sys/trap.asm C 2 signal.h
sigprocmask libc/sys/syscall.c signal.h
sigsetjmp 3 setjmp.h
sigsetmask libc/sys/trap.asm C 2 signal.h
sleep libc/gen/sleep.c T 3 unistd.h
snprintf libc/stdio/snprintf.c C 3 stdio.h
socket libc/sys/trap.asm C 2 sys/socket.h
ssignal libc/sys/trap.asm C 2 gno/gno.h
sprintf libc/stdio/sprintf.c C 3 stdio.h
sscanf libc/stdio/sscanf.c C 3 stdio.h
ssignal libc/sys/trap.asm T 2 gno/gno.h
stat libc/sys/trap.asm C 2 sys/stat.h
statfs libc/sys/syscall.c C 2 sys/mount.h
strcasecmp libc/str/case.c T 3 string.h
@ -252,28 +352,41 @@ 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
swait libc/sys/trap.asm C 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
syslog libc/gen/syslog.asm C 3 sys/syslog.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.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
tmpfile orcalib/stdio.asm T 3 stdio.h
tmpnam orcalib/stdio.asm T 3 stdio.h
tmpfile libc/stdio/tmpfile.c T(1) 3 stdio.h
tmpnam libc/stdio/tmpnam.c C 3 stdio.h
truncate libc/sys/syscall.c C 2 unistd.h
ttyname libc/gen/tty.c C 3 unistd.h
ttyslot libc/gen/tty.c C 3 unistd.h
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
verr libc/gen/err.c T 3 err.h
verrx libc/gen/err.c T 3 err.h
vfork libc/sys/trap.asm C 2 unistd.h
vsyslog libc/gen/syslog.asm C 3 sys/syslog.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.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
@ -283,102 +396,232 @@ 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
login libutil/login.c C libutil.h
login_tty libutil/logintty.c C libutil.h
Notes:
[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
have to be updated all at once (see the TO.DO file).
[C] logwtmp() is a stub at the moment. It can be called, but
will not modify the utmp/wtmp files.
@@ -- The sys_errlist and sys_nerr variables are currently renamed
to _gno_sys_errlist and _gno_sys_nerr until problems with OrcaLib
can be resolved. _Don't_ access any of these four variables
directly; go through strerror().
Library Sources Currently Compiling:
-----------------------------------
Files Currently Compiling:
-------------------------
- This list is exclusive of modified or standard ORCA libraries
- Where the filename appears with no other information, the
file is present but not yet part of the build.
DATA OPTIMIZE DEBUG MEMORY SEGMENT TESTING NAME
BANK MODEL COMPLETE
==============================================================
0 0 0 Y Y libc/gen/basename.c
0 0 0 Y N libc/gen/bmem.c
0 0 0 Y N libc/gen/compat.c
0 0 0 N N libc/gen/crypt.c
78 0 0 Y Y libc/gen/basename.c
78 0 0 Y N libc/gen/bmem.c
78 0 0 Y N libc/gen/compat.c
78 0 0 N N libc/gen/crypt.c
na na N N libc/gen/crypta.asm
0 0 0 Y Y libc/gen/dirent.c
78 0 0 Y Y libc/gen/dirent.c
8 0 0 Y Y libc/gen/err.c
0 0 0 Y Y libc/gen/fnmatch.c
0 0 0 Y Y libc/gen/getcwd.c
0 0 0 Y Y libc/gen/getgrent.c
0 0 0 Y N libc/gen/getpass.c
0 0 0 Y Y libc/gen/getpwent.c
0 0 0 Y N libc/gen/getttyent.c
0 0 0 Y N libc/gen/hostname.c
0 0 0 Y N libc/gen/oldlog.c
0 0 0 Y N libc/gen/popen.c
0 0 0 Y N libc/gen/pwcache.c
0 0 0 Y Y libc/gen/scandir.c
78 0 0 Y Y libc/gen/fnmatch.c
78 0 0 Y Y libc/gen/fts.c
78 0 0 Y Y libc/gen/getcwd.c
78 0 0 Y Y libc/gen/getgrent.c
78 0 0 Y N libc/gen/getlogin.c
78 0 0 Y N libc/gen/getpass.c
78 0 0 Y Y libc/gen/getpwent.c
78 0 0 Y N libc/gen/getttyent.c
78 0 0 Y N libc/gen/hostname.c
78 0 0 Y N libc/gen/oldlog.c
78 0 0 Y N libc/gen/popen.c
78 0 0 Y N libc/gen/psignal.c
78 0 0 Y N libc/gen/pwcache.c
78 0 0 Y Y libc/gen/scandir.c
na na N N libc/gen/setjmp.asm
0 0 0 Y Y libc/gen/sleep.c
na na Y N libc/gen/syslog.asm
0 0 0 Y N libc/gen/tty.c
0 0 0 Y Y libc/gen/utime.c
78 0 0 Y N libc/gen/siglist.c
78 0 0 Y Y libc/gen/sleep.c
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
0* 0 0 (1) Y Y libc/gno/gnomisc.c
0 (79) 0 0 (1) Y Y libc/gno/gsstring.c
0 0 (25) 0 (1) Y N libc/gno/map.c
78 0 0 (1) Y Y libc/gno/gnomisc.c
78 (79) 0 0 (1) Y Y libc/gno/gsstring.c
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
0 0 0 Y N libc/locale/table.c [stub]
78 0 0 Y N libc/locale/table.c [stub]
0 0 0 Y N libc/stdio/mktemp.c
1 0 0 0 Y Y libc/stdio/perror.c
0 0 0 Y N libc/stdio/tempnam.c
78 0 0 Y N libc/stdio/clrerr.c
78 0 0 Y N libc/stdio/fclose.c
78 0 0 Y N libc/stdio/fdopen.c
78 0 0 Y N libc/stdio/feof.c
78 0 0 Y N libc/stdio/ferror.c
78 0 0 Y N libc/stdio/fflush.c
78 0 0 Y N libc/stdio/fgetc.c
78 0 0 Y N libc/stdio/fgetln.c
78 0 0 Y N libc/stdio/fgetpos.c
78 0 0 Y N libc/stdio/fgets.c
78 0 0 Y N libc/stdio/fileno.c
78 0 0 Y N libc/stdio/findfp.c
78 0 0 Y N libc/stdio/flags.c
78 0 0 Y N libc/stdio/fopen.c
78 0 0 Y N libc/stdio/fprintf.c
78 0 0 Y N libc/stdio/fpurge.c
78 0 0 Y N libc/stdio/fputc.c
78 0 0 Y N libc/stdio/fputs.c
78 0 0 Y N libc/stdio/fread.c
78 0 0 Y N libc/stdio/freopen.c
78 0 0 Y N libc/stdio/fscanf.c
78 0 0 Y N libc/stdio/fseek.c
78 0 0 Y N libc/stdio/fsetpos.c
78 0 0 Y N libc/stdio/ftell.c
78 0 0 Y N libc/stdio/funopen.c
78 0 0 Y N libc/stdio/fvwrite.c
78 0 0 Y N libc/stdio/fwalk.c
78 0 0 Y N libc/stdio/fwrite.c
78 0 0 Y N libc/stdio/getc.c
78 0 0 Y N libc/stdio/getchar.c
78 0 0 Y N libc/stdio/gets.c
78 0 0 Y N libc/stdio/getw.c
78 0 0 Y N libc/stdio/makebuf.c
78 0 0 Y N libc/stdio/mktemp.c
78 0 0 Y N libc/stdio/perror.c
78 0 0 Y N libc/stdio/printf.c
78 0 0 Y N libc/stdio/putc.c
78 0 0 Y N libc/stdio/putchar.c
78 0 0 Y N libc/stdio/puts.c
78 0 0 Y N libc/stdio/putw.c
78 0 0 Y N libc/stdio/refill.c
78 0 0 Y N libc/stdio/remove.c
78 0 0 Y N libc/stdio/rewind.c
78 0 0 Y N libc/stdio/rget.c
78 0 0 Y N libc/stdio/scanf.c
78 0 0 Y N libc/stdio/setbuf.c
78 0 0 Y N libc/stdio/setbuffer.c
78 0 0 Y N libc/stdio/setvbuf.c
78 0 0 Y N libc/stdio/snprintf.c
78 0 0 Y N libc/stdio/sprintf.c
78 0 0 Y N libc/stdio/sscanf.c
78 0 0 Y N libc/stdio/stdio.c
78 0 0 Y N libc/stdio/tempnam.c
78 0 0 Y N libc/stdio/tmpfile.c
78 0 0 Y N libc/stdio/tmpnam.c
78 0 0 Y N libc/stdio/ungetc.c
78 0 0 Y N libc/stdio/vfprintf.c
78 0 0 Y N libc/stdio/vfscanf.c
78 0 0 Y N libc/stdio/vprintf.c
78 0 0 Y N libc/stdio/vscanf.c
78 0 0 Y N libc/stdio/vsnprintf.c
78 0 0 Y N libc/stdio/vsprintf.c
78 0 0 Y N libc/stdio/vsscanf.c
78 0 0 Y N libc/stdio/wbuf.c
78 0 0 Y N libc/stdio/wsetup.c
1 0 0 0 Y Y libc/stdlib/environ.c
0 0 0 Y N libc/stdlib/getopt.c
0 0 0 Y N libc/stdlib/getsubopt.c
78 0 0 Y N libc/stdlib/cvt.c
1 78 0 0 Y Y libc/stdlib/environ.c
na na Y Y libc/stdlib/fpspecnum.asm
78 0 0 Y N libc/stdlib/getopt.c
78 0 0 Y N libc/stdlib/getsubopt.c
0 0 0 Y N libc/string/case.c
0 0 0 Y N libc/string/str.c
libc/stdtime/asctime.c
libc/stdtime/difftime.c
libc/stdtime/localtime.c
libc/stdtime/strftime.c
0+8 0 0 Y libc/sys/exec.c
0+8 0 0 Y libc/sys/syscall.c
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
na na Y N libc/sys/trap.asm
0 0 0 Y N libutil/login.c
0 0 0 Y N libutil/logintty.c
libutil/logout.c
0 0 0 Y N libutil/logwtmp.c
libutil/pty.c
libutil/setproc.c
NOTES: () tested at a previous level
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
environ 7
ms 7
man 7
cron 8
runover 8 (obsolete?)
dialup 8
These are unimplemented kernel traps.
PUT IN NEXT RELEASE
-------------------
fts_children (libc/gen/fts.c) 3
fts_close (libc/gen/fts.c) 3
fts_open (libc/gen/fts.c) 3
fts_read (libc/gen/fts.c) 3
fts_set (libc/gen/fts.c) 3
chmod (libc/sys/syscall.c) 2
fchmod (libc/sys/syscall.c)
fcntl (sys/fcntl.h)
fdopen
sys_siglist [var]
kernel trap needed can be implemented comments
as a library call
===================================================================
acct no
adjtim low pri yes
brk no
chflags no
chroot no
fcntl yes not completely
fpathconf not now
getdirentries low pri yes
getdtablesize yes not completely
getfh no
getfsstat low pri yes
getgroups yes not completely
getitimer yes no
getlogin yes not completely
getpriority low pri no
getrlimit no no
getrusage low pri no
getsockopt yes no
gettimeofday low pri yes
ktrace not now
link no
madvise no
mincore no
mkfifo yes no
mknod no
mlock no
mmap no
mount not now a dynamic namespace facility?
mprotect no
msync no
munlock no
munmap no
nfssvc not now
pathconf not now
profil no
ptrace not now
readlink not now symlinks
revoke no
rtprio no
semctl low pri
semget low pri
semop low pri
setgroups yes not completely
setitimer yes no
setlogin yes not completely
setpriority low pri no
setrlimit no no
setsid low pri maybe
settimeofday low pri yes I've got code from Tilghman
shmat not now maybe shared mem
shmctl not now maybe shared mem
shmdt not now maybe shared mem
shmget not now maybe shared mem
sigaction low pri (?) maybe
sigalstack no
sigpending low pri no
sigreturn no
sigstack no
sigsuspend no
socketpair low pri
swapon no
symlink not now no symlinks
sync low pri not completely
syscall no
umask low pri unclear semantics

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

12
bin/cat/Makefile Normal file
View File

@ -0,0 +1,12 @@
#
# This makefile is intended for use with dmake(1) on Apple IIGS
#
# Created by Dave Tribby, July 1997
#
# $Id: Makefile,v 1.2 1997/09/26 06:15:13 gdr Exp $
#
# Program name
PROG= cat
.INCLUDE : /src/gno/prog.mk

117
bin/cat/cat.1 Normal file
View File

@ -0,0 +1,117 @@
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" the Institute of Electrical and Electronics Engineers, Inc.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)cat.1 8.3 (Berkeley) 5/2/95
.\" $Id: cat.1,v 1.2 1997/10/03 04:00:10 gdr Exp $
.\"
.TH CAT 1 "August 1997" "GNO" "Commands and Applications"
.SH NAME
.BR cat
\- concatenate and print files
.SH SYNOPSIS
.BR cat " [" -benstuv ]
.IR file \0...
.SH DESCRIPTION
The
.BR cat
utility reads files sequentially, writing them to the standard output.
The
.IR file
operands are processed in command line order.
A single dash represents the standard input.
.LP
.SS OPTIONS
.IP \fB-b\fR
Implies the
.B "-n"
option but doesn't number blank lines.
.IP \fB-e\fR
Implies the
.B "-v"
option, and displays a dollar sign (\fB$\fR)
at the end of each line
as well.
.IP \fB-n\fR
Number the output lines, starting at 1.
.IP \fB-s\fR
Squeeze multiple adjacent empty lines, causing the output to be
single spaced.
.IP \fB-t\fR
Implies the
.B -v
option, and displays tab characters as
.B ^I
as well.
.IP \fB-u\fR
The
.B -u
option guarantees that the output is unbuffered.
.IP \fB-v\fR
Displays non-printing characters so they are visible.
Control characters print as
.B ^X
for control-X; the delete
character (octal 0177) prints as
.B ^?
Non-ascii characters (with the high bit set) are printed as
.B M-
(for meta) followed by the character for the low 7 bits.
.RE
.LP
The
.BR cat
utility exits 0 on success, and >0 if an error occurs.
.SH WARNINGS
Because of the shell language mechanism used to perform output
redirection, the command
.IP
.B "cat file1 file2 > file1"
.PP
will cause the original data in file1 to be destroyed!
Instead use
.IP
.B "cat file2 >> file1"
.SH VERSION
This manual page documents
.BR cat
version 2.0.
.SH ATTRIBUTIONS
This command was ported from FreeBSD source code
for distribution with GNO/ME 2.0.6.
.SH SEE ALSO
.BR head (1),
.BR more (1),
.BR pr (1),
.BR tail (1),
.BR vis (1)

323
bin/cat/cat.c Normal file
View File

@ -0,0 +1,323 @@
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Kevin Fall.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cat.c,v 1.3 1997/10/03 03:59:41 gdr Exp $
*/
/*
* Modified for GNO (Apple IIGS) by Dave Tribby, July 1997
*
* Constructs unacceptable to compiler are replaced using #ifndef __ORCAC__
*
* Changes not related to compiler are replaced using #ifndef __GNO__
*
* Added prototyped headers, surrounded by #ifndef __STDC__
*/
#ifndef __GNO__
#ifndef lint
static char const copyright[] =
"@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char const sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
#endif /* not lint */
#endif
#include <sys/param.h>
#include <sys/stat.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#ifndef __GNO__
#include <locale.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int bflag, eflag, nflag, sflag, tflag, vflag;
int rval;
char *filename;
void cook_args __P((char *argv[]));
void cook_buf __P((FILE *));
void raw_args __P((char *argv[]));
void raw_cat __P((int));
/* Interface to check on how much stack space a C program uses. */
#if defined(__GNO__) && defined(__STACK_CHECK__)
#ifndef _GNO_GNO_H_
#include <gno/gno.h>
#endif
static void report_stack(void)
{
fprintf(stderr,"\n ==> %d stack bytes used <== \n", _endStackCheck());
}
#endif
int
#ifndef __STDC__
main(argc, argv)
int argc;
char *argv[];
#else
main(int argc,
char *argv[])
#endif
{
extern int optind;
int ch;
#if defined(__GNO__) && defined(__STACK_CHECK__)
_beginStackCheck();
atexit(report_stack);
#endif
#ifndef __GNO__
setlocale(LC_CTYPE, "");
#endif
while ((ch = getopt(argc, argv, "benstuv")) != -1)
switch (ch) {
case 'b':
bflag = nflag = 1; /* -b implies -n */
break;
case 'e':
eflag = vflag = 1; /* -e implies -v */
break;
case 'n':
nflag = 1;
break;
case 's':
sflag = 1;
break;
case 't':
tflag = vflag = 1; /* -t implies -v */
break;
case 'u':
setbuf(stdout, (char *)NULL);
break;
case 'v':
vflag = 1;
break;
default:
(void)fprintf(stderr,
"usage: cat [-benstuv] [-] [file ...]\n");
exit(1);
}
#ifndef __ORCAC__
argv += optind;
#else
argv = argv + optind;
#endif
if (bflag || eflag || nflag || sflag || tflag || vflag)
cook_args(argv);
else
raw_args(argv);
if (fclose(stdout))
err(1, "stdout");
exit(rval);
}
void
#ifndef __STDC__
cook_args(argv)
char **argv;
#else
cook_args(char *argv[])
#endif
{
register FILE *fp;
fp = stdin;
filename = "stdin";
do {
if (*argv) {
if (!strcmp(*argv, "-"))
fp = stdin;
else if ((fp = fopen(*argv, "r")) == NULL) {
warn("%s", *argv);
rval = 1;
++argv;
continue;
}
filename = *argv++;
}
cook_buf(fp);
if (fp != stdin)
(void)fclose(fp);
} while (*argv);
}
void
#ifndef __STDC__
cook_buf(fp)
register FILE *fp;
#else
cook_buf(register FILE *fp)
#endif
{
register int ch, gobble, line, prev;
line = gobble = 0;
for (prev = '\n'; (ch = getc(fp)) != EOF; prev = ch) {
if (prev == '\n') {
if (ch == '\n') {
if (sflag) {
if (!gobble && putchar(ch) == EOF)
break;
gobble = 1;
continue;
}
if (nflag && !bflag) {
(void)fprintf(stdout, "%6d\t", ++line);
if (ferror(stdout))
break;
}
} else if (nflag) {
(void)fprintf(stdout, "%6d\t", ++line);
if (ferror(stdout))
break;
}
}
gobble = 0;
if (ch == '\n') {
if (eflag)
if (putchar('$') == EOF)
break;
} else if (ch == '\t') {
if (tflag) {
if (putchar('^') == EOF || putchar('I') == EOF)
break;
continue;
}
} else if (vflag) {
if (!isascii(ch) && !isprint(ch)) {
if (putchar('M') == EOF || putchar('-') == EOF)
break;
ch = toascii(ch);
}
if (iscntrl(ch)) {
if (putchar('^') == EOF ||
putchar(ch == '\177' ? '?' :
ch | 0100) == EOF)
break;
continue;
}
}
if (putchar(ch) == EOF)
break;
}
if (ferror(fp)) {
warn("%s", filename);
rval = 1;
clearerr(fp);
}
if (ferror(stdout))
err(1, "stdout");
}
void
#ifndef __STDC__
raw_args(argv)
char **argv;
#else
raw_args(char *argv[])
#endif
{
register int fd;
fd = fileno(stdin);
filename = "stdin";
do {
if (*argv) {
if (!strcmp(*argv, "-"))
fd = fileno(stdin);
#ifndef __GNO__
else if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
#else /* GNO: 3rd parameter legal only when creating */
else if ((fd = open(*argv, O_RDONLY)) < 0) {
#endif
warn("%s", *argv);
rval = 1;
++argv;
continue;
}
filename = *argv++;
}
raw_cat(fd);
if (fd != fileno(stdin))
(void)close(fd);
} while (*argv);
}
void
#ifndef __STDC__
raw_cat(rfd)
register int rfd;
#else
raw_cat(register int rfd)
#endif
{
register int nr, nw, off, wfd;
static int bsize;
static char *buf;
struct stat sbuf;
wfd = fileno(stdout);
if (buf == NULL) {
if (fstat(wfd, &sbuf))
err(1, "%s", filename);
bsize = MAX(sbuf.st_blksize, 1024);
if ((buf = malloc((u_int)bsize)) == NULL)
err(1, NULL);
}
while ((nr = read(rfd, buf, bsize)) > 0)
for (off = 0; nr; nr -= nw, off += nw)
if ((nw = write(wfd, buf + off, nr)) < 0)
err(1, "stdout");
if (nr < 0) {
warn("%s", filename);
rval = 1;
}
}

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

@ -0,0 +1,9 @@
Name: cat
Version: 2.0 (August 1997)
Shell: GNO
Author: Dave Tribby (from FreeBSD code)
Contact: tribby@cup.hp.com
Where: /bin
FTP: ground.icaen.uiowa.edu apple2.caltech.edu ftp.gno.org
Concatenate and list files.

29
bin/cat/cat.rez Normal file
View File

@ -0,0 +1,29 @@
/*
* Resources for version and comment
*/
#define PROG "cat"
#define DESC "Concatenate and list files."
#include "Types.rez"
/*
* Version
*/
resource rVersion (1, purgeable3) {
{ 2, 0, 0, /* Version 2.0.0 */
release, /* development|alpha|beta|final|release */
0 }, /* non-final release number */
verUS, /* Country */
PROG, /* Program name */
DESC " Released with GNO/ME."
};
/*
* Comment
*/
resource rComment (1, purgeable3) {
PROG " v2.0 (August 1997)\n"
"GNO utility: " DESC "\n"
"Ported from FreeBSD code by Dave Tribby."
};

150
bin/cat/tests/dotests Normal file
View File

@ -0,0 +1,150 @@
# Tests for cat command; invoked by command file "fulltests"
# Written by Dave Tribby (August 1997)
# $Id: dotests,v 1.2 1997/10/03 03:58:54 gdr Exp $
# Location of the cat command to be tested
set testcmd="../cat"
# Record starting time
echo -n "Testing command $testcmd beginning at"
date
set src="file1.mixed"
set cmp="file1.mixed"
set dest="/tmp/$cmp"
echo "Copying a single text file ($src) using filename input"
$testcmd $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set dest="/tmp/${cmp}A"
echo "Copying a single text file ($src) using stdin"
$testcmd < $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set cmp="file1.bopt"
set dest="/tmp/${cmp}"
echo "Display a single text file ($src) with -b option"
$testcmd -b $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set cmp="file1.nopt"
set dest="/tmp/${cmp}"
echo "Display a single text file ($src) with -n option"
$testcmd -n $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set cmp="file1.topt"
set dest="/tmp/${cmp}"
echo "Display a single text file ($src) with -t option"
$testcmd -t $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set cmp="file1.eopt"
set dest="/tmp/${cmp}"
echo "Display a single text file ($src) with -e option"
$testcmd -e $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set src2=file1.nopt
set cmp="file1.combo"
set dest="/tmp/${cmp}"
echo "Combine two files ($src, $src2) with stdin in the middle"
set msg="===== stdin in between file1.mixed and $file1.nopt ====="
echo $msg | $testcmd $src - $src2 > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set src="file2.bin1"
set cmp="file2.bin1"
set dest="/tmp/$cmp"
echo "Copying a single binary file ($src) using filename input"
$testcmd $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set dest="/tmp/${cmp}A"
echo "Copying a single binary file ($src) using stdin"
$testcmd < $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set cmp="file2.vopt"
set dest="/tmp/${cmp}"
echo "Display a single binary file ($src) with -v option"
$testcmd -v $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set cmp="file2.topt"
set dest="/tmp/${cmp}"
echo "Display a single binary file ($src) with -t option"
$testcmd -t $src > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
set src="$testcmd"
set cmp="$testcmd"
set dest="/tmp/cat"
echo "Copying a single binary file ($src) through a pipe"
$testcmd $src | $testcmd > $dest
echo " Completion status = $status"
echo "Checking results against control file $cmp (no differences expected)"
cmp $cmp $dest
echo " Completion status = $status"
echo ""
echo "***** Error Messages *****"
set dest="/tmp/err.cond"
echo ""
echo "Expected error: illegal option"
$testcmd -x $src > $dest
echo " Error completion status = $status (expected: 1)"
echo ""
set src="badname"
echo "Expected error: $src: no such file or directory"
$testcmd $src > $dest
echo " Error completion status = $status (expected: 1)"

19
bin/cat/tests/file1.bopt Normal file
View File

@ -0,0 +1,19 @@
1 # Create the test environment for tr
2 # Compile and load flags passed to occ
3 # -v: verbose
4 # -I: add directory to header path
5 CFLAGS += -v -I /usr/include
6 LDFLAGS += -v
7 # Default target, "all," generates the files
8 all: file2.bin1 genbin
9 # Files depend upon program
10 file2.bin1: genbin
11 ./genbin
12 # Remove intermediate files
13 clean:
14 $(RM) -f *.o
15 $(RM) -f *.root

39
bin/cat/tests/file1.combo Normal file
View File

@ -0,0 +1,39 @@
# Create the test environment for tr
# Compile and load flags passed to occ
# -v: verbose
# -I: add directory to header path
CFLAGS += -v -I /usr/include
LDFLAGS += -v
# Default target, "all," generates the files
all: file2.bin1 genbin
# Files depend upon program
file2.bin1: genbin
./genbin
# Remove intermediate files
clean:
$(RM) -f *.o
$(RM) -f *.root
===== stdin in between file1.mixed and .nopt =====
1 # Create the test environment for tr
2
3 # Compile and load flags passed to occ
4 # -v: verbose
5 # -I: add directory to header path
6 CFLAGS += -v -I /usr/include
7 LDFLAGS += -v
8
9 # Default target, "all," generates the files
10 all: file2.bin1 genbin
11
12 # Files depend upon program
13 file2.bin1: genbin
14 ./genbin
15
16 # Remove intermediate files
17 clean:
18 $(RM) -f *.o
19 $(RM) -f *.root

19
bin/cat/tests/file1.eopt Normal file
View File

@ -0,0 +1,19 @@
# Create the test environment for tr$
$
# Compile and load flags passed to occ$
# -v: verbose$
# -I: add directory to header path$
CFLAGS += -v -I /usr/include$
LDFLAGS += -v$
$
# Default target, "all," generates the files$
all: file2.bin1 genbin$
$
# Files depend upon program$
file2.bin1: genbin$
./genbin$
$
# Remove intermediate files$
clean:$
$(RM) -f *.o$
$(RM) -f *.root$

19
bin/cat/tests/file1.mixed Normal file
View File

@ -0,0 +1,19 @@
# Create the test environment for tr
# Compile and load flags passed to occ
# -v: verbose
# -I: add directory to header path
CFLAGS += -v -I /usr/include
LDFLAGS += -v
# Default target, "all," generates the files
all: file2.bin1 genbin
# Files depend upon program
file2.bin1: genbin
./genbin
# Remove intermediate files
clean:
$(RM) -f *.o
$(RM) -f *.root

19
bin/cat/tests/file1.nopt Normal file
View File

@ -0,0 +1,19 @@
1 # Create the test environment for tr
2
3 # Compile and load flags passed to occ
4 # -v: verbose
5 # -I: add directory to header path
6 CFLAGS += -v -I /usr/include
7 LDFLAGS += -v
8
9 # Default target, "all," generates the files
10 all: file2.bin1 genbin
11
12 # Files depend upon program
13 file2.bin1: genbin
14 ./genbin
15
16 # Remove intermediate files
17 clean:
18 $(RM) -f *.o
19 $(RM) -f *.root

19
bin/cat/tests/file1.topt Normal file
View File

@ -0,0 +1,19 @@
# Create the test environment for tr
# Compile and load flags passed to occ
# -v: verbose
# -I: add directory to header path
CFLAGS^I+= -v -I /usr/include
LDFLAGS^I+= -v
# Default target, "all," generates the files
all: file2.bin1 genbin
# Files depend upon program
file2.bin1: genbin
^I./genbin
# Remove intermediate files
clean:
^I$(RM) -f *.o
^I$(RM) -f *.root

BIN
bin/cat/tests/file2.bin1 Normal file

Binary file not shown.

3
bin/cat/tests/file2.topt Normal file
View File

@ -0,0 +1,3 @@
^@^A^B^C^D^E^F^G^H^I
^K^L
^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^^^_

3
bin/cat/tests/file2.vopt Normal file
View File

@ -0,0 +1,3 @@
^@^A^B^C^D^E^F^G^H
^K^L
^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^^^_

18
bin/cat/tests/file4.text Normal file
View File

@ -0,0 +1,18 @@
This is a text file
that contains multiple blank lines
to check out the "cat" command's ability
to remove extra lines (using the -r command).
===== END OF 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
};

27
bin/chtyp/Makefile Normal file
View File

@ -0,0 +1,27 @@
#
# This makefile is intended for use with dmake(1) on Apple IIGS
#
# Created by Dave Tribby, August 1997
# Modified by Evan Day, September 1997
#
# $Id: Makefile,v 1.2 1998/02/19 02:03:15 gdr-ftp Exp $
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.
OPTIMIZE*= 79
# Current implementation is using 960 bytes give or take
STACK = 1024
.INCLUDE : /src/gno/prog.mk
#
# Additional dependancies.
#
ftypes.o: ftypes.h
chtyp.o: ftypes.h

72
bin/chtyp/chtyp.1 Normal file
View File

@ -0,0 +1,72 @@
.\"
.\" $Id: chtyp.1,v 1.1 1997/10/03 05:06:50 gdr Exp $
.\"
.TH CHTYP 1 "28 September 1997" GNO "Commands and Applications"
.SH NAME
.BR chtyp
\- change GS/OS file type information
.SH SYNOPSIS
.BR chtyp
[ [
.IR -t " " ftype
] [
.IR -a " " atype
] ] | [
.IR -l " " lang
]
.IR file ...
.SH DESCRIPTION
Set GS/OS file type information for the specified
.IR files
.LP
File types may be specified either as a number (decimal,
hexadecimal with a leading 0x, or octal with a leading 0)
or by a three letter abbreviation. Abbreviations are from
the official File Type Notes Index.
.LP
Auxilary types may only be specified as a number (decimal,
hexadecimal, or octal).
.LP
If a file type is specified with no aux type, or vice versa,
only the specified parameter is changed - the other is left
as is.
.LP
The language option sets the file type and aux type appropriate
for a source file of the specified language. See below for a
list of valid languages.
.SH OPTIONS
The following options are available:
.IP "\fB-t\fR \fIftype\fR"
Set the file type of the indicated files to the specified
.IR ftype "."
The file type may be specified as a number (in decimal, as a
hexadecimal number with a leading 0x, or as an octal number
with a leading 0) or by one of the official three letter
abbreviations listed in the File Type Notes Index. Types set
by abbreviation may not have their auxilary file types set
due to the large variety of assigned auxilary types for each
file type.
.IP "\fB-a\fR \fIatype\fR"
Set the auxilary file type of the indicated files to the
.IR atype
specified. The auxilary type may only be specified as a
number.
.IP "\fB-l\fR \fIlang\fR"
Set the file type and auxilary file type to that of a source
file of the selected
.IR lang "."
The
.IR -l
flag may not be used with the
.IR -t
or
.IR -a
flags.
.IP
Valid language types are: APWTXT, ASM, PASCAL, EXEC, CC, LINKER,
DESKTOP, REZ, TMLPASCAL, DISASM, SDEASM, SDECMD, PS.
.SH HISTORY
.BR chtyp
was originally written by Greg Thompson. Jawaid Bazyar rewrote it
later for GNO/ME, and it has since been rewritten from scratch for
GNO/ME v2.0.6 by Evan Day <day@engr.orst.edu>.

145
bin/chtyp/chtyp.c Normal file
View File

@ -0,0 +1,145 @@
/*
* chtyp
*
* Sets the file/aux type for GS/OS files.
*
* $Id: chtyp.c,v 1.1 1997/10/03 05:06:50 gdr Exp $
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gsos.h>
#include "ftypes.h"
void usage(void);
void version(void);
#ifdef __STACK_CHECK__
#include <gno/gno.h>
static void cleanup(void)
{
(void) fprintf(stderr, "Stack Usage: %d.\n", _endStackCheck());
}
#endif
static GSString255 path;
int main(int argc, char **argv)
{
char *ftype = NULL;
char *atype = NULL;
char *lang = NULL;
char *left = NULL;
int filet = -1;
long auxt = -1;
int ch;
FileInfoRecGS finfo = {4, &path};
#ifdef __STACK_CHECK__
atexit(cleanup);
_beginStackCheck();
#endif
while((ch = getopt(argc, argv, "t:a:l:vV")) != -1)
switch(ch) {
case 't':
if(lang) {
(void) fprintf(stderr,
"chtyp: -t cannot be used with -l\n");
usage();
}
ftype = optarg;
break;
case 'a':
if(lang) {
(void) fprintf(stderr,
"chtyp: -a cannot be used with -l\n");
usage();
}
atype = optarg;
break;
case 'l':
if(ftype || atype) {
(void) fprintf(stderr,
"chtyp: -l cannot be used with %s%s\n",
ftype ? "-t" : "-a",
ftype && atype ? " or -a." : ".");
usage();
}
lang = optarg;
break;
case 'v':
case 'V':
version();
break;
default:
usage();
break;
}
argc -= optind;
argv = argv + optind;
if(argc == 0) {
(void) fprintf(stderr, "chtyp: no files specified\n");
usage();
}
if(lang) {
if(find_lang(lang, &filet, &auxt) == -1) {
(void) fprintf(stderr, "chtyp: unknown language argument \"%s\".\n",
lang);
usage();
}
}
if(ftype) {
filet = (int) strtol(ftype, &left, 0);
if(errno == ERANGE || *left)
if(find_type(ftype, &filet, &auxt) == -1) {
(void) fprintf(stderr,
"chtyp: invalid argument to -t option.\n");
usage();
}
}
if(atype) {
errno = 0; /* be sure to reset errno! */
auxt = strtol(atype, (char **) NULL, 0);
if(errno == ERANGE) {
(void) fprintf(stderr, "chtyp: invalid argument to -a option.\n");
usage();
}
}
ch = 0;
while(argc) {
strcpy(path.text, argv[ch]);
path.length = strlen(argv[ch++]);
GetFileInfoGS(&finfo);
if(filet != -1)
finfo.fileType = filet;
if(auxt != -1)
finfo.auxType = auxt;
SetFileInfoGS(&finfo);
argc--;
}
}
static void usage(void)
{
(void) fprintf(stderr,
"Usage: chtyp { [-t type] [-a auxtype] } | { [-l lang] } file ...\n");
exit(-1);
}
static void version(void)
{
(void) fprintf(stderr,
"V 2.0.0 Copyright 1997 by Evan Day, day@engr.orst.edu\n");
usage();
}

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

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

34
bin/chtyp/chtyp.rez Normal file
View File

@ -0,0 +1,34 @@
/*
* $Id: chtyp.rez,v 1.2 1997/10/05 16:41:46 gdr Exp $
*/
#include "Types.Rez"
#include "proginfo.rez"
resource rVersion (0x1, purgeable3, nocrossbank) {
{ 2, 0, 0, /* version 2.0.0 */
release, /* development|alpha|beta|final|release */
0 /* non-final release number */
},
verUS, /* country code -- only some are avail */
"chtyp", /* name */
/* _Very_ brief descrition. Check "file info" */
/* shown in the Finder to see if it's too long */
/* Note that \n is used to separate lines here. */
"Change GS/OS file type information.\n"
"Requires GNO/ME Shell.\n"
"Evan Day <day@engr.orst.edu>"
};
resource rProgramInfo (0x1, purgeable3, nocrossbank) {
{ 6, 0, 1,
release,
0
},
80000, /* These are rough... the library isn't */
80000, /* final yet. */
1024,
progRequiresGNO+progAppleTalkOK+progAllowsCDAs,
piCompatible*ProgShellGSH+piSpecialFeatures*ProgShellGSH
};

171
bin/chtyp/ftypes.c Normal file
View File

@ -0,0 +1,171 @@
/*
* ftypes.c
*
* data/routines to change an official Apple 3-letter filetype abbrevation
* into a full filetype/auxtype pair (or back, I suppose)
*
* also data/routines to change a language type (as specified in chtyp.1)
* into a filetype/auxtype pair.
*
* $Id: ftypes.c,v 1.1 1997/10/03 05:06:50 gdr Exp $
*/
#include <string.h>
static struct type_list {
char *name;
int file_type;
long aux_type;
} types[] = {
{ "non", 0x00, 0x0000 }, /* common abbrev for $00 */
{ "unk", 0x00, 0x0000 }, /* official abbrev for $00 */
{ "bad", 0x01, 0x0000 },
{ "pcd", 0x02, 0x0000 },
{ "ptx", 0x03, 0x0000 },
{ "txt", 0x04, 0x0000 },
{ "pda", 0x05, 0x0000 },
{ "bin", 0x06, 0x0000 },
{ "fnt", 0x07, 0x0000 },
{ "fot", 0x08, 0x0000 },
{ "ba3", 0x09, 0x0000 },
{ "da3", 0x0a, 0x0000 },
{ "wpf", 0x0b, 0x0000 },
{ "sos", 0x0c, 0x0000 },
{ "dir", 0x0f, 0x0000 },
{ "rpd", 0x10, 0x0000 },
{ "rpi", 0x11, 0x0000 },
{ "afd", 0x12, 0x0000 },
{ "afm", 0x13, 0x0000 },
{ "afr", 0x14, 0x0000 },
{ "scl", 0x15, 0x0000 },
{ "pfs", 0x16, 0x0000 },
{ "adb", 0x19, 0x0000 },
{ "awp", 0x1a, 0x0000 },
{ "asp", 0x1b, 0x0000 },
{ "tdm", 0x20, 0x0000 },
{ "8sc", 0x2a, 0x0000 },
{ "8ob", 0x2b, 0x0000 },
{ "8ic", 0x2c, 0x0000 },
{ "8ld", 0x2d, 0x0000 },
{ "p8c", 0x2e, 0x0000 },
{ "ptp", 0x2e, 0x8001 }, /* Point-to-point drivers */
{ "ftd", 0x42, 0x0000 },
{ "gwp", 0x50, 0x0000 },
{ "gss", 0x51, 0x0000 },
{ "gdb", 0x52, 0x0000 },
{ "drw", 0x53, 0x0000 },
{ "gdp", 0x54, 0x0000 },
{ "hmd", 0x55, 0x0000 },
{ "edu", 0x56, 0x0000 },
{ "stn", 0x57, 0x0000 },
{ "hlp", 0x58, 0x0000 },
{ "com", 0x59, 0x0000 },
{ "cfg", 0x5a, 0x0000 },
{ "anm", 0x5b, 0x0000 },
{ "mum", 0x5c, 0x0000 },
{ "ent", 0x5d, 0x0000 },
{ "dvu", 0x5e, 0x0000 },
{ "bio", 0x6b, 0x0000 },
{ "tdr", 0x6d, 0x0000 },
{ "pre", 0x6e, 0x0000 },
{ "hdv", 0x6f, 0x0000 },
{ "wp", 0xa0, 0x0000 },
{ "gsb", 0xab, 0x0000 },
{ "tdf", 0xac, 0x0000 },
{ "bdf", 0xad, 0x0000 },
{ "src", 0xb0, 0x0000 },
{ "obj", 0xb1, 0x0000 },
{ "lib", 0xb2, 0x0000 },
{ "s16", 0xb3, 0x0000 },
{ "rtl", 0xb4, 0x0000 },
{ "exe", 0xb5, 0x0000 },
{ "pif", 0xb6, 0x0000 },
{ "tif", 0xb7, 0x0000 },
{ "nda", 0xb8, 0x0000 },
{ "cda", 0xb9, 0x0000 },
{ "tol", 0xba, 0x0000 },
{ "dvr", 0xbb, 0x0000 },
{ "ldf", 0xbc, 0x0000 },
{ "fst", 0xbd, 0x0000 },
{ "doc", 0xbf, 0x0000 },
{ "pnt", 0xc0, 0x0000 },
{ "pic", 0xc1, 0x0000 },
{ "ani", 0xc2, 0x0000 },
{ "pal", 0xc3, 0x0000 },
{ "oog", 0xc5, 0x0000 },
{ "scr", 0xc6, 0x0000 },
{ "cdv", 0xc7, 0x0000 },
{ "fon", 0xc8, 0x0000 },
{ "fnd", 0xc9, 0x0000 },
{ "icn", 0xca, 0x0000 },
{ "mus", 0xd5, 0x0000 },
{ "ins", 0xd6, 0x0000 },
{ "mdi", 0xd7, 0x0000 },
{ "snd", 0xd8, 0x0000 },
{ "dbm", 0xdb, 0x0000 },
{ "lbr", 0xe0, 0x0000 },
{ "atk", 0xe2, 0x0000 },
{ "r16", 0xee, 0x0000 },
{ "pas", 0xef, 0x0000 },
{ "cmd", 0xf0, 0x0000 },
{ "os" , 0xf9, 0x0000 },
{ "int", 0xfa, 0x0000 },
{ "ivr", 0xfb, 0x0000 },
{ "bas", 0xfc, 0x0000 },
{ "var", 0xfd, 0x0000 },
{ "rel", 0xfe, 0x0000 },
{ "sys", 0xff, 0x0000 }
};
#define NUM_TYPES 98
static struct lang_list {
char *name;
int file_type;
long aux_type;
} langs[] = {
{ "apwtxt", 0xb0, 0x0001},
{ "asm", 0xb0, 0x0003},
{ "pascal", 0xb0, 0x0005},
{ "exec", 0xb0, 0x0006},
{ "cc", 0xb0, 0x0008},
{ "linker", 0xb0, 0x0009},
{ "apwc", 0xb0, 0x000a},
{ "desktop", 0xb0, 0x000c},
{ "rez", 0xb0, 0x0015},
{ "tmlpascal", 0xb0, 0x001e},
{ "disasm", 0xb0, 0x0115},
{ "sdeasm", 0xb0, 0x0503},
{ "sdecmd", 0xb0, 0x0506},
{ "ps", 0xb0, 0x0719},
};
#define NUM_LANGS 14
int find_type(char *type_str, int *f, long *a)
{
int i;
for(i = 0; i < NUM_TYPES; i++)
if(!stricmp(type_str, types[i].name)) {
*f = types[i].file_type;
*a = types[i].aux_type;
return(0);
}
return(-1);
}
int find_lang(char *lang_str, int *f, long *a)
{
int i;
for(i = 0; i < NUM_LANGS; i++)
if(!stricmp(lang_str, langs[i].name)) {
*f = langs[i].file_type;
*a = langs[i].aux_type;
return(0);
}
return(-1);
}

6
bin/chtyp/ftypes.h Normal file
View File

@ -0,0 +1,6 @@
/*
* $Id: ftypes.h,v 1.1 1997/10/03 05:06:50 gdr Exp $
*/
extern int find_type(char *, int *, long *);
extern int find_lang(char *, int *, long *);

27
bin/cmp/Makefile Normal file
View File

@ -0,0 +1,27 @@
#
# This makefile is intended for use with dmake(1) on Apple IIGS
#
# Created by Dave Tribby, August 1997
# Modified by Evan Day, September 1997
#
# $Id: Makefile,v 1.3 1998/02/19 02:05:06 gdr-ftp Exp $
PROG= cmp
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.
OPTIMIZE *= 79
# Current implementation is using ~1050 bytes give or take
STACK = 1280
.INCLUDE : /src/gno/prog.mk
#
# Additional dependancies
#
cmp.o: extern.h
misc.o: extern.h
rcmp.o: extern.h
special.o: extern.h

114
bin/cmp/cmp.1 Normal file
View File

@ -0,0 +1,114 @@
.\" Copyright (c) 1987, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" the Institute of Electrical and Electronics Engineers, Inc.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)cmp.1 8.1 (Berkeley) 6/6/93
.\" $Id: cmp.1,v 1.1 1997/10/03 05:13:22 gdr Exp $
.\"
.TH CMP 1 "28 September 1997" GNO "Commands and Applications"
.SH NAME
.BR cmp
\- compare two files
.SH SYNOPSIS
.BR cmp " [" -l " | " -s "] ["
.BR -r
]
.IR file1
.IR file2
[
.IR skip1
[
.IR skip2
] ]
.SH DESCRIPTION
The
.BR cmp
utility compares two files of any type and writes the results
to the standard output.
By default,
.BR cmp
is silent if the files are the same; if they differ, the byte
and line number at which the first difference occurred is reported.
Also by default,
.BR cmp
also considers the resource forks of the files, and will make note
if only one of the files has a resource fork.
.PP
Bytes and lines are numbered beginning with one.
.PP
The following options are available:
.IP \fB-l\fR
Print the byte number (decimal) and the differing
byte values (octal) for each difference.
.IP \fB-s\fR
Print nothing for differing files; return exit
status only.
.IP \fB-r\fR
Ignore resource forks when comparing.
.PP
The optional arguments
.IR skip1
and
.IR skip2
are the byte offsets from the beginning of
.IR file1
and
.IR file2 ,
respectively, where the comparison will begin.
The offset is decimal by default, but may be expressed as an hexadecimal
or octal value by preceding it with a leading ``0x'' or ``0''.
.PP
The
.BR cmp
utility exits with one of the following values:
.IP \fB0\fR
The files are identical.
.IP \fB1\fR
The files are different; this includes the case
where one file is identical to the first part of
the other.
In the latter case, if the
.IR -s
option has not been specified,
.BR cmp
writes to standard output that EOF was reached in the shorter
file (before any differences were found).
.IP \fB>1\fR
An error occurred.
.SH SEE ALSO
.BR diff(1),
.BR diff3(1)
.SH HISTORY
The
.BR cmp
command for GNO/ME v2.0.6 is based on FreeBSD source code.

243
bin/cmp/cmp.c Normal file
View File

@ -0,0 +1,243 @@
/*
* Copyright (c) 1987, 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* cmp for GNO/ME v2.0.6
*
* $Id: cmp.c,v 1.1 1997/10/03 05:13:22 gdr Exp $
*/
#ifndef __GNO__
#ifndef lint
static char copyright[] =
"@(#) Copyright (c) 1987, 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#endif
#ifndef __GNO__
#ifndef lint
static char sccsid[] = "@(#)cmp.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "extern.h"
int lflag, sflag;
#ifdef __GNO__
int rflag;
#endif
static void usage __P((void));
#ifdef __STACK_CHECK__
#include <gno/gno.h>
static void cleanup(void)
{
(void) fprintf(stderr, "%d\n", _endStackCheck());
}
#endif
int
#ifndef __STDC__
main(argc, argv)
int argc;
char *argv[];
#else
main(int argc, char *argv[])
#endif
{
struct stat sb1, sb2;
off_t skip1, skip2;
int ch, fd1, fd2, special;
char *file1, *file2;
#ifdef __STACK_CHECK__
atexit(cleanup);
_beginStackCheck();
#endif
#ifdef __GNO__
while ((ch = getopt(argc, argv, "-lsr")) != -1)
#else
while ((ch = getopt(argc, argv, "-ls")) != -1)
#endif
switch (ch) {
case 'l': /* print all differences */
lflag = 1;
break;
case 's': /* silent run */
sflag = 1;
break;
#ifdef __GNO__
case 'r':
rflag = 1; /* ignore resource fork */
break;
#endif
case '-': /* stdin (must be after options) */
--optind;
goto endargs;
case '?':
default:
usage();
}
endargs:
#ifndef __ORCAC__
argv += optind;
#else
argv = argv + optind;
#endif
argc -= optind;
if (lflag && sflag)
errx(ERR_EXIT, "only one of -l and -s may be specified");
if (argc < 2 || argc > 4)
usage();
/* Backward compatibility -- handle "-" meaning stdin. */
special = 0;
if (strcmp(file1 = argv[0], "-") == 0) {
special = 1;
fd1 = 0;
file1 = "stdin";
}
#ifndef __GNO__
else if ((fd1 = open(file1, O_RDONLY, 0)) < 0) {
#else
/* open() for GNO/ME requires 3rd arg iff creating file */
else if ((fd1 = open(file1, O_RDONLY)) < 0) {
#endif
if (!sflag)
err(ERR_EXIT, "%s", file1);
else
exit(1);
}
if (strcmp(file2 = argv[1], "-") == 0) {
if (special)
errx(ERR_EXIT,
"standard input may only be specified once");
special = 1;
fd2 = 0;
file2 = "stdin";
}
#ifndef __GNO__
else if ((fd2 = open(file2, O_RDONLY, 0)) < 0) {
#else
else if ((fd2 = open(file2, O_RDONLY)) < 0) {
#endif
if (!sflag)
err(ERR_EXIT, "%s", file2);
else
exit(1);
}
skip1 = argc > 2 ? strtol(argv[2], NULL, 10) : 0;
skip2 = argc == 4 ? strtol(argv[3], NULL, 10) : 0;
#ifndef __GNO__
if (!special) {
if (fstat(fd1, &sb1)) {
if (!sflag)
err(ERR_EXIT, "%s", file1);
else
exit(1);
}
if (!S_ISREG(sb1.st_mode))
special = 1;
else {
if (fstat(fd2, &sb2)) {
if (!sflag)
err(ERR_EXIT, "%s", file2);
else
exit(1);
}
if (!S_ISREG(sb2.st_mode))
special = 1;
}
}
#else
special = 1; /* GNO doesn't have mmap.h, so treat every file as
a special file and process byte by byte */
#endif
if (special)
#ifdef __GNO__
{
#endif
c_special(fd1, file1, skip1, fd2, file2, skip2);
#ifdef __GNO__
close(fd1);
close(fd2);
}
if (rflag != 1) {
rflag = 2;
rcmp(&fd1, &fd2, file1, file2);
close(fd1);
close(fd2);
}
#else
else
c_regular(fd1, file1, skip1, sb1.st_size,
fd2, file2, skip2, sb2.st_size);
#endif
/* exit(0); */
}
static void
#ifndef __STDC__
usage()
#else
usage(void)
#endif
{
(void)fprintf(stderr,
#ifndef __GNO__
"usage: cmp [-l | -s] file1 file2 [skip1 [skip2]]\n");
#else
"usage: cmp [-l | -s] [-r] file1 file2 [skip1 [skip2]]\n");
#endif
exit(ERR_EXIT);
}

10
bin/cmp/cmp.desc Normal file
View File

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

33
bin/cmp/cmp.rez Normal file
View File

@ -0,0 +1,33 @@
/*
* $Id: cmp.rez,v 1.3 1997/10/30 02:28:49 gdr Exp $
*/
#include "Types.Rez"
#include "proginfo.rez"
resource rVersion (0x1, purgeable3, nocrossbank) {
{ 2, 0, 0, /* version */
release, /* development|alpha|beta|final|release */
0 /* non-final release number */
},
verUS, /* country code -- only some are avail */
"cmp", /* name */
/* _Very_ brief descrition. Check "file info" */
/* shown in the Finder to see if it's too long */
/* Note that \n is used to separate lines here. */
"Compares two files on disk.\n"
"Requires GNO/ME Shell.\n"
"Evan Day <day@engr.orst.edu>"
};
resource rProgramInfo (0x1, purgeable3, nocrossbank) {
{ 6, 0, 1,
release,
0
},
80000, /* Rough estimates - the library isn't */
80000, /* final yet. */
1280,
progRequiresGNO+progAppleTalkOK+progAllowsCDAs,
piCompatible*ProgShellGSH+piSpecialFeatures*ProgShellGSH
};

51
bin/cmp/extern.h Normal file
View File

@ -0,0 +1,51 @@
/*-
* Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)extern.h 8.3 (Berkeley) 4/2/94
*/
#define OK_EXIT 0
#define DIFF_EXIT 1
#define ERR_EXIT 2 /* error exit code */
void c_regular __P((int, char *, off_t, off_t, int, char *, off_t, off_t));
void c_special __P((int, char *, off_t, int, char *, off_t));
void diffmsg __P((char *, char *, off_t, off_t));
void eofmsg __P((char *));
#ifdef __GNO__
void rcmp __P((int *, int *, char *, char *));
#endif
extern int lflag, sflag;
#ifdef __GNO__
extern int rflag;
#endif

85
bin/cmp/misc.c Normal file
View File

@ -0,0 +1,85 @@
/*-
* Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* part of cmp for GNO/ME v2.0.6
*
* $Id: misc.c,v 1.1 1997/10/03 05:13:23 gdr Exp $
*/
#ifndef __GNO__
#ifndef lint
static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#endif
#include <sys/types.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include "extern.h"
void
#ifndef __STDC__
eofmsg(file)
char *file;
#else
eofmsg(char *file)
#endif
{
if (!sflag)
warnx("EOF on %s", file);
exit(DIFF_EXIT);
}
void
#ifndef __STDC__
diffmsg(file1, file2, byte, line)
char *file1, *file2;
off_t byte, line;
#else
diffmsg(char *file1, char *file2, off_t byte, off_t line)
#endif
{
if (!sflag)
#ifndef __ORCAC__
(void)printf("%s %s differ: char %qd, line %qd\n",
file1, file2, byte, line);
#else
(void)printf("[%s] %s differ: %s char %ld, line %ld\n",
(rflag==2) ? "resfork" : "datafork", file1, file2, byte, line);
#endif
exit(DIFF_EXIT);
}

52
bin/cmp/rcmp.c Normal file
View File

@ -0,0 +1,52 @@
/*
* rcmp.c
*
* Opens the resource forks of two files and sets the file descriptors to
* the open forks (if present).
*
* Catches files with no resource fork.
*
* Part of cmp for GNO/ME v2.0.6
*
* $Id: rcmp.c,v 1.1 1997/10/03 05:13:23 gdr Exp $
*/
#include <gsos.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "extern.h"
static GSString255 path;
void rcmp(int *fd1, int *fd2, char *file1, char *file2)
{
OpenRecGS ropen = {4, 0, &path, readEnable, 1};
strcpy(path.text, file1);
path.length = strlen(file1);
OpenGS(&ropen);
*fd1 = ropen.refNum;
strcpy(path.text, file2);
path.length = strlen(file2);
OpenGS(&ropen);
*fd2 = ropen.refNum;
if(*fd1 == 0)
if(*fd2 == 0)
return;
else {
(void) printf("%s has a resource fork, %s does not.\n",
file2, file1);
return;
}
else if(*fd2 == 0) {
(void) printf("%s has a resource fork, %s does not.\n", file1,
file2);
return;
}
c_special(*fd1, file1, 0, *fd2, file2, 0);
}

156
bin/cmp/regular.c Normal file
View File

@ -0,0 +1,156 @@
/*-
* Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: regular.c,v 1.1 1997/10/03 05:13:23 gdr Exp $
*/
#ifndef lint
static char sccsid[] = "@(#)regular.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#include <sys/param.h>
#ifndef __GNO__
#include <sys/mman.h>
#endif
#include <sys/stat.h>
#include <err.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "extern.h"
#define ROUNDPAGE(i) ((i) & ~pagemask)
void
#ifndef __STDC__
c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
int fd1, fd2;
char *file1, *file2;
off_t skip1, len1, skip2, len2;
#else
c_regular(int fd1, char *file1, off_t skip1, off_t len1, int fd2, char *file2,
off_t skip2, off_t len2)
#endif
{
#ifndef __GNO__
u_char ch, *p1, *p2;
#else
u_char ch, p1, p2;
#endif
off_t byte, length, line;
int dfound;
off_t pagemask, off1, off2;
if (sflag && len1 != len2)
exit(1);
if (skip1 > len1)
eofmsg(file1);
len1 -= skip1;
if (skip2 > len2)
eofmsg(file2);
len2 -= skip2;
pagemask = (off_t)getpagesize() - 1;
off1 = ROUNDPAGE(skip1);
off2 = ROUNDPAGE(skip2);
length = MIN(len1, len2);
#ifndef __ORCAC__
if (length > SIZE_T_MAX)
return (c_special(fd1, file1, skip1, fd2, file2, skip2));
#else
if (length > SIZE_T_MAX) {
c_special(fd1, file1, skip1, fd2, file2, skip2);
return;
}
#endif
#ifndef __GNO__
if ((p1 = (u_char *)mmap(NULL,
(size_t)length, PROT_READ, MAP_SHARED, fd1, off1)) == (u_char *)MAP_FAILED)
err(ERR_EXIT, "%s", file1);
madvise(p1, length, MADV_SEQUENTIAL);
if ((p2 = (u_char *)mmap(NULL,
(size_t)length, PROT_READ, MAP_SHARED, fd2, off2)) == (u_char *)MAP_FAILED)
err(ERR_EXIT, "%s", file2);
madvise(p2, length, MADV_SEQUENTIAL);
dfound = 0;
p1 += skip1 - off1;
p2 += skip2 - off2;
for (byte = line = 1; length--; ++p1, ++p2, ++byte) {
if ((ch = *p1) != *p2)
if (lflag) {
dfound = 1;
(void)printf("%6qd %3o %3o\n", byte, ch, *p2);
} else
diffmsg(file1, file2, byte, line);
/* NOTREACHED */
if (ch == '\n')
++line;
}
if (len1 != len2)
eofmsg (len1 > len2 ? file2 : file1);
if (dfound)
exit(DIFF_EXIT);
#else
dfound = 0;
lseek(fd1, skip1, SEEK_SET);
lseek(fd2, skip2, SEEK_SET);
for (byte = line = 1; length--; ++byte) {
read(fd1, (void *) &p1, 1);
read(fd2, (void *) &p2, 1);
if (p1 != p2)
if (lflag) {
dfound = 1;
(void)printf("%6qd %3o %3o\n", byte, ch, p2);
} else
diffmsg(file1, file2, byte, line);
/* NOTREACHED */
if (p1 == '\n')
++line;
}
if (len1 != len2)
eofmsg (len1 > len2 ? file2 : file1);
if (dfound)
exit(DIFF_EXIT);
#endif
}

116
bin/cmp/special.c Normal file
View File

@ -0,0 +1,116 @@
/*-
* Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Part of cmp for GNO/ME v2.0.6
*
* $Id: special.c,v 1.1 1997/10/03 05:13:23 gdr Exp $
*/
#ifndef __GNO__
#ifndef lint
static char sccsid[] = "@(#)special.c 8.3 (Berkeley) 4/2/94";
#endif /* not lint */
#endif
#include <sys/types.h>
#include <err.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "extern.h"
void
#ifndef __STDC__
c_special(fd1, file1, skip1, fd2, file2, skip2)
int fd1, fd2;
char *file1, *file2;
off_t skip1, skip2;
#else
c_special(int fd1, char *file1, off_t skip1, int fd2, char *file2, off_t skip2)
#endif
{
int ch1, ch2;
off_t byte, line;
FILE *fp1, *fp2;
int dfound;
if ((fp1 = fdopen(fd1, "r")) == NULL)
err(ERR_EXIT, "%s", file1);
if ((fp2 = fdopen(fd2, "r")) == NULL)
err(ERR_EXIT, "%s", file2);
dfound = 0;
while (skip1--)
if (getc(fp1) == EOF)
goto eof;
while (skip2--)
if (getc(fp2) == EOF)
goto eof;
for (byte = line = 1;; ++byte) {
ch1 = getc(fp1);
ch2 = getc(fp2);
if (ch1 == EOF || ch2 == EOF)
break;
if (ch1 != ch2) {
if (lflag) {
dfound = 1;
#ifndef __GNO__
(void)printf("%6qd %3o %3o\n", byte, ch1, ch2);
#else
(void)printf("%c%6ld %3o %3o\n", (rflag==2)? 'R' : 'D', byte, ch1, ch2);
#endif
} else
diffmsg(file1, file2, byte, line);
/* NOTREACHED */
}
if (ch1 == '\n')
++line;
}
eof: if (ferror(fp1))
err(ERR_EXIT, "%s", file1);
if (ferror(fp2))
err(ERR_EXIT, "%s", file2);
if (feof(fp1)) {
if (!feof(fp2))
eofmsg(file1);
} else
if (feof(fp2))
eofmsg(file2);
if (dfound)
exit(DIFF_EXIT);
}

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

25
bin/df/Makefile Normal file
View File

@ -0,0 +1,25 @@
#
# This makefile is intended for use with dmake(1) on Apple IIGS
#
# Created by Dave Tribby, August 1997
# Modified by Evan Day, September 1997
#
# $Id: Makefile,v 1.2 1998/02/19 02:12:18 gdr-ftp Exp $
PROG= df
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.
OPTIMIZE *= 79
# Current implementation is using 960 bytes give or take
STACK = 1024
.INCLUDE : /src/gno/prog.mk
#
# Additional dependancies
#
df.o: df.h
gnodf.o: df.h

104
bin/df/df.1 Normal file
View File

@ -0,0 +1,104 @@
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)df.1 8.3 (Berkeley) 5/8/95
.\"
.\" $Id: df.1,v 1.1 1997/10/03 05:42:18 gdr Exp $
.\"
.TH DF 1 "04 August 1997" GNO "Commands and Applications"
.SH NAME
.BR df
\- display free disk space and disk usage statistics
.SH SYNOPSIS
.BR df " [" -k "] [" -t
.IR "FST list"
]
.IR devnum
|
.IR vol
|
.IR file ...
.SH DESCRIPTION
displays statistics about the amount of free disk space on the
specified device number
.IR devnum
(.d##), on the specified volume
.IR vol
or on the volume of which
.IR file
is a part. More than one device number, volume, or file may be
listed, and types can be mixed in the argument list.
.LP
Values are displayed in 512-byte per block block counts.
If neither a file or a filesystem operand is specified,
statistics for all mounted filesystems are displayed.
Devices without valid media (e.g. a 3.5" disk drive with
no disk in the drive) are not included in the output.
.SH OPTIONS
The following options are available:
.IP \fB-k\fR
Use 1024-byte (1-Kbyte) blocks rather than the default. Note
that this overrides the
.BR BLOCKSIZE
specification from the environment.
.IP "\fB-t\fR \fIfst1,...,fstN\fR"
Only print out statistics for filesystems of the specified types.
More than one type may be specified in a comma separated list.
The list of filesystem types can be prefixed with
.IR no
to specify the filesystem types for which action should
not be taken.
.LP
For example, the
.BR df
command:
.nf
df -t nohfs,msdos
.fi
lists all filesystems except those of type
.IR HFS
and
.IR MS-DOS
.LP
Acceptable filesystem types are as follows:
.IP
prodos, dos33, dos32, pascal, mfs, hfs, lisa, cpm,
msdos, highsierra, iso9660, appleshare.
.SH ENVIRONMENT VARIABLES
.IP \fBBLOCKSIZE\fR
If the environment variable
.BR BLOCKSIZE
is set, the block counts will be displayed in units of that size block.
.SH HISTORY
.BR df
for GNO/ME was originally built-in to gsh(1). The implementation of
.BR df
is based on FreeBSD source code and distributed with GNO/ME v2.0.6

510
bin/df/df.c Normal file
View File

@ -0,0 +1,510 @@
/*
* Copyright (c) 1980, 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: df.c,v 1.1 1997/10/03 05:42:18 gdr Exp $
*/
/*
* df for GNO/ME v2.0.6
* $ID$
*/
#ifndef __GNO__
#ifndef lint
static char const copyright[] =
"@(#) Copyright (c) 1980, 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#endif
#ifndef __GNO__
#ifndef lint
static char const sccsid[] = "@(#)df.c 8.9 (Berkeley) 5/8/95";
#endif /* not lint */
#endif
#include <sys/param.h>
#include <sys/stat.h>
#ifndef __GNO__
#include <sys/mount.h>
#include <ufs/ufs/ufsmount.h>
#else
#include "df.h"
#endif
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifndef __GNO__
int checkvfsname __P((const char *, char **));
char **makevfslist __P((char *));
#else
void makevfslist __P((char *));
#endif
#ifndef __GNO__
long regetmntinfo __P((struct statfs **, long, char **));
int bread __P((off_t, void *, int));
char *getmntpt __P((char *));
#endif
void prtstat __P((struct statfs *, int));
#ifndef __GNO__
void ufs_df __P((char *, int));
#endif
void usage __P((void));
int iflag, nflag;
struct ufs_args mdev;
#ifdef __STACK_CHECK__
#include <gno/gno.h>
static void cleanup(void)
{
(void) fprintf(stderr, "Stack Usage: %d\n", _endStackCheck());
}
#endif
/*
The #ifdef's get quite messy, as there are certain filesystem things that
GNO/ME doesn't handle the same as UNIX. A lot of code is #ifdef'd out, but
left here with the thought that in the future some of it may be useful as
new libraries or FSTs are created.
The files gnodf.c contains a couple of UNIX library functions I've recreated
well enough to work for this applications, but I wouldn't even think of
adding to a library...
In particular, I muck with the statfs structure. DO NOT CALL statfs() or
fstatfs() with this structure. It may work and may cause a crash. This
structure is strictly for use with df(1) and the hacked functions in gnodf.c
which fill in fields with GS/OS calls, not kernel calls.
*/
int
#ifndef __STDC__
main(argc, argv)
int argc;
char *argv[];
#else
main(int argc, char *argv[])
#endif
{
struct stat stbuf;
struct statfs statfsbuf, *mntbuf;
long mntsize;
int ch, err, i, maxwidth, width;
#ifndef __GNO__
char *mntpt, **vfslist;
vfslist = NULL;
#else
char *mntpt;
#endif
#ifdef __STACK_CHECK__
atexit(cleanup);
_beginStackCheck();
#endif
#ifndef __GNO__
while ((ch = getopt(argc, argv, "iknt:")) != -1)
#else
while ((ch = getopt(argc, argv, "kt:")) != -1)
#endif
switch (ch) {
#ifndef __GNO__
case 'i':
iflag = 1;
break;
#endif
case 'k':
putenv("BLOCKSIZE=1k");
break;
#ifndef __GNO__
case 'n':
nflag = 1;
break;
#endif
case 't':
#ifndef __GNO__
if (vfslist != NULL)
#else
if (vfslist[14])
#endif
errx(1, "only one -t option may be specified.");
#ifndef __GNO__
vfslist = makevfslist(optarg);
#else
makevfslist(optarg);
#endif
break;
case '?':
default:
usage();
}
argc -= optind;
#ifndef __ORCAC__
argv += optind;
#else
argv = argv + optind;
#endif
mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
maxwidth = 0;
for (i = 0; i < mntsize; i++) {
width = strlen(mntbuf[i].f_mntfromname);
if (width > maxwidth)
maxwidth = width;
}
if (!*argv) {
#ifndef __GNO__
mntsize = regetmntinfo(&mntbuf, mntsize, vfslist);
if (vfslist != NULL) {
maxwidth = 0;
for (i = 0; i < mntsize; i++) {
width = strlen(mntbuf[i].f_mntfromname);
if (width > maxwidth)
maxwidth = width;
}
}
#endif
for (i = 0; i < mntsize; i++)
prtstat(&mntbuf[i], maxwidth);
exit(0);
}
for (; *argv; argv++) {
if (stat(*argv, &stbuf) < 0) {
err = errno;
#ifndef __GNO__
if ((mntpt = getmntpt(*argv)) == 0) {
warn("%s", *argv);
continue;
}
#else
warn("%s", *argv);
continue;
#endif
#ifndef __GNO__
} else if ((stbuf.st_mode & S_IFMT) == S_IFCHR) {
ufs_df(*argv, maxwidth);
continue;
} else if ((stbuf.st_mode & S_IFMT) == S_IFBLK) {
if ((mntpt = getmntpt(*argv)) == 0) {
mntpt = mktemp(strdup("/tmp/df.XXXXXX"));
mdev.fspec = *argv;
if (mkdir(mntpt, DEFFILEMODE) != 0) {
warn("%s", mntpt);
continue;
}
if (mount("ufs", mntpt, MNT_RDONLY,
&mdev) != 0) {
ufs_df(*argv, maxwidth);
(void)rmdir(mntpt);
continue;
} else if (statfs(mntpt, &statfsbuf) == 0) {
statfsbuf.f_mntonname[0] = '\0';
prtstat(&statfsbuf, maxwidth);
} else
warn("%s", *argv);
(void)unmount(mntpt, 0);
(void)rmdir(mntpt);
continue;
}
#endif
} else
mntpt = *argv;
/*
* Statfs does not take a `wait' flag, so we cannot
* implement nflag here.
*/
#ifndef __GNO__
if (statfs(mntpt, &statfsbuf) < 0) {
warn("%s", mntpt);
continue;
}
#else
strcpy(statfsbuf.f_mntonname, mntpt);
if (nameinfo(&statfsbuf) < 0) {
warn("%s", statfsbuf.f_mntonname);
continue;
}
#endif
if (argc == 1)
maxwidth = strlen(statfsbuf.f_mntfromname) + 1;
prtstat(&statfsbuf, maxwidth);
}
return (0);
}
#ifndef __GNO__
char *
#ifndef __STDC__
getmntpt(name)
char *name;
#else
getmntpt(char *name)
#endif
{
long mntsize, i;
struct statfs *mntbuf;
mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
for (i = 0; i < mntsize; i++) {
if (!strcmp(mntbuf[i].f_mntfromname, name))
return (mntbuf[i].f_mntonname);
}
return (0);
}
#endif
#ifndef __GNO__
/*
* Make a pass over the filesystem info in ``mntbuf'' filtering out
* filesystem types not in vfslist and possibly re-stating to get
* current (not cached) info. Returns the new count of valid statfs bufs.
*/
long
#ifndef __STDC__
regetmntinfo(mntbufp, mntsize, vfslist)
struct statfs **mntbufp;
long mntsize;
char **vfslist;
#else
regetmntinfo(struct fsinfo **mntbufp, long mntsize, char **vfslist)
#endif
{
int i, j;
struct statfs *mntbuf;
if (vfslist == NULL)
return (nflag ? mntsize : getmntinfo(mntbufp, MNT_WAIT));
mntbuf = *mntbufp;
for (j = 0, i = 0; i < mntsize; i++) {
if (checkvfsname(mntbuf[i].f_fstypename, vfslist))
continue;
if (!nflag)
(void)statfs(mntbuf[i].f_mntonname,&mntbuf[j]);
else if (i != j)
mntbuf[j] = mntbuf[i];
j++;
}
return (j);
}
#endif
/*
* Convert statfs returned filesystem size into BLOCKSIZE units.
* Attempts to avoid overflow for large filesystems.
*/
#define fsbtoblk(num, fsbs, bs) \
(((fsbs) != 0 && (fsbs) < (bs)) ? \
(num) / ((bs) / (fsbs)) : (num) * ((fsbs) / (bs)))
/*
* Print out status about a filesystem.
*/
void
#ifndef __STDC__
prtstat(sfsp, maxwidth)
struct statfs *sfsp;
int maxwidth;
#else
prtstat(struct statfs *sfsp, int maxwidth)
#endif
{
static long blocksize;
static int headerlen, timesthrough;
static char *header;
long used, availblks, inodes;
if (maxwidth < 11)
maxwidth = 11;
if (++timesthrough == 1) {
header = getbsize(&headerlen, &blocksize);
#ifdef __GNO__
(void)printf("Dev# ");
#endif
(void)printf("%-*.*s %s Used Avail Capacity",
maxwidth, maxwidth, "Filesystem", header);
if (iflag)
(void)printf(" iused ifree %%iused");
#ifdef __GNO__
(void)printf("%12s", "FST");
#endif
(void)printf(" Mounted on\n");
}
#ifdef __GNO__
if(!vfslist[sfsp->f_type])
return;
(void)printf(".d%-2ld ", (sfsp->f_fsid).lo);
#endif
(void)printf("%-*.*s", maxwidth, maxwidth, sfsp->f_mntfromname);
used = sfsp->f_blocks - sfsp->f_bfree;
availblks = sfsp->f_bavail + used;
(void)printf(" %*ld %7ld %7ld", headerlen,
fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize),
fsbtoblk(used, sfsp->f_bsize, blocksize),
fsbtoblk(sfsp->f_bavail, sfsp->f_bsize, blocksize));
(void)printf(" %5.0f%%",
availblks == 0 ? 100.0 : (double)used / (double)availblks * 100.0);
if (iflag) {
inodes = sfsp->f_files;
used = inodes - sfsp->f_ffree;
(void)printf(" %7ld %7ld %5.0f%% ", used, sfsp->f_ffree,
inodes == 0 ? 100.0 : (double)used / (double)inodes * 100.0);
} else
(void)printf(" ");
#ifdef __GNO__
(void)printf("%12s", fs_name[sfsp->f_type]);
#endif
(void)printf(" %s\n", sfsp->f_mntonname);
}
#ifndef __GNO__
/*
* This code constitutes the pre-system call Berkeley df code for extracting
* information from filesystem superblocks.
*/
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <errno.h>
#include <fstab.h>
union {
struct fs iu_fs;
char dummy[SBSIZE];
} sb;
#define sblock sb.iu_fs
int rfd;
void
#ifndef __STDC__
ufs_df(file, maxwidth)
char *file;
int maxwidth;
#else
ufs_df(char *file, int maxwidth)
#endif
{
struct statfs statfsbuf;
struct statfs *sfsp;
char *mntpt;
static int synced;
if (synced++ == 0)
sync();
if ((rfd = open(file, O_RDONLY)) < 0) {
warn("%s", file);
return;
}
if (bread((off_t)SBOFF, &sblock, SBSIZE) == 0) {
(void)close(rfd);
return;
}
sfsp = &statfsbuf;
sfsp->f_type = 1;
strcpy(sfsp->f_fstypename, "ufs");
sfsp->f_flags = 0;
sfsp->f_bsize = sblock.fs_fsize;
sfsp->f_iosize = sblock.fs_bsize;
sfsp->f_blocks = sblock.fs_dsize;
sfsp->f_bfree = sblock.fs_cstotal.cs_nbfree * sblock.fs_frag +
sblock.fs_cstotal.cs_nffree;
sfsp->f_bavail = freespace(&sblock, sblock.fs_minfree);
sfsp->f_files = sblock.fs_ncg * sblock.fs_ipg;
sfsp->f_ffree = sblock.fs_cstotal.cs_nifree;
sfsp->f_fsid.val[0] = 0;
sfsp->f_fsid.val[1] = 0;
if ((mntpt = getmntpt(file)) == 0)
mntpt = "";
memmove(&sfsp->f_mntonname[0], mntpt, MNAMELEN);
memmove(&sfsp->f_mntfromname[0], file, MNAMELEN);
prtstat(sfsp, maxwidth);
(void)close(rfd);
}
int
#ifndef __STDC__
bread(off, buf, cnt)
off_t off;
void *buf;
int cnt;
#else
bread(off_t off, void *buf, int cnt)
#endif
{
int nr;
(void)lseek(rfd, off, SEEK_SET);
if ((nr = read(rfd, buf, cnt)) != cnt) {
/* Probably a dismounted disk if errno == EIO. */
if (errno != EIO)
(void)fprintf(stderr, "\ndf: %qd: %s\n",
off, strerror(nr > 0 ? EIO : errno));
return (0);
}
return (1);
}
#endif
void
#ifndef __STDC__
usage()
#else
usage(void)
#endif
{
(void)fprintf(stderr,
#ifndef __GNO__
"usage: df [-ikn] [-t type] [file | filesystem ...]\n");
#else
"usage: df [-k] [-t type] [devnum | volume | file ...]\n");
#endif
exit(1);
}

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

@ -0,0 +1,9 @@
Name: df
Version: 1.0 (28 Sep 97)
Shell: GNO/ME
Author: Evan Day (from FreeBSD source)
Contact: day@engr.orst.edu
Where: /bin
FTP: ftp.gno.org
Displays free disk space and disk usage statistics for GS/OS block devices.

61
bin/df/df.h Normal file
View File

@ -0,0 +1,61 @@
/*
* df.h
*
* Bastardized sys/mount.h with local constants and functions to provide
* functions not available in the gno libraries.
*
* $Id: df.h,v 1.1 1997/10/03 05:42:18 gdr Exp $
*/
#ifndef _SYS_TYPES_H_
#include <sys/types.h>
#endif
typedef quad_t fsid_t; /* formerly an equivalent struct */
struct statfs {
long f_type; /* FST type (see below) */
long f_bsize; /* fundamental file system block size */
long f_blocks; /* total blocks in file system */
long f_bfree; /* free blocks */
long f_bavail; /* free blocks available to non-superuser */
long f_files; /* total file nodes in file system */
long f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id (GS/OS device number) */
long f_spare[7]; /* reserved */
char f_mntfromname[32]; /* device name */
char f_mntonname[32]; /* volume name */
};
#define MOUNT_PRODOS 0x0001 /* ProDOS or SOS */
#define MOUNT_DOS_33 0x0002 /* DOS 3.3 */
#define MOUNT_DOS_32 0x0003 /* DOS 3.1 or 3.2 */
#define MOUNT_PASCAL 0x0004 /* Apple II Pascal */
#define MOUNT_MFS 0x0005 /* Macintosh (MFS) */
#define MOUNT_HFS 0x0006 /* Macintosh (HFS) */
#define MOUNT_LISA 0x0007 /* Lisa */
#define MOUNT_CPM 0x0008 /* Apple CP/M */
#define MOUNT_MSDOS 0x000A /* MS/DOS */
#define MOUNT_HISHS 0x000B /* High Sierra */
#define MOUNT_CD9660 0x000C /* ISO 9660 (CD-ROM) */
#define MOUNT_APLSHAR 0x000D /* AppleShare */
#ifndef _SYS_CDEFS_H_
#include <sys/cdefs.h>
#endif
/* This constant is used in the one non-#ifdef'd getmntinfo() call */
#define MNT_NOWAIT 0
/* "Helper" functions to fill in the statfs structure where statfs() fails */
int nameinfo(struct statfs *);
void devinfo(struct statfs *);
long getmntinfo(struct statfs **, char);
char *getbsize(int *, long *);
/* Data structures */
extern char *fs_name[];
extern char vfslist[];

33
bin/df/df.rez Normal file
View File

@ -0,0 +1,33 @@
/*
* $Id: df.rez,v 1.3 1997/10/05 16:42:03 gdr Exp $
*/
#include "Types.Rez"
#include "proginfo.rez"
resource rVersion (0x1, purgeable3, nocrossbank) {
{ 1, 0, 0, /* version 1.0.0 */
release, /* development|alpha|beta|final|release */
0 /* non-final release number */
},
verUS, /* country code -- only some are avail */
"df", /* name */
/* _Very_ brief descrition. Check "file info" */
/* shown in the Finder to see if it's too long */
/* Note that \n is used to separate lines here. */
"Display free disk space.\n"
"Requires GNO/ME Shell.\n"
"Evan Day <day@engr.orst.edu>"
};
resource rProgramInfo (0x1, purgeable3, nocrossbank) {
{ 6, 0, 1,
release,
0
},
80000, /* Overestimate, but the library */
80000, /* isn't final yet. */
1024,
progRequiresGNO+progAppleTalkOK+progAllowsCDAs,
piCompatible*ProgShellGSH+piSpecialFeatures*ProgShellGSH
};

268
bin/df/gnodf.c Normal file
View File

@ -0,0 +1,268 @@
/*
* gnodf.c
*
* Provide missing library functions to make df(1) work right
* $ID$
*/
#include <gsos.h>
#include <stdlib.h>
#include <string.h>
#include "df.h"
/* Array of FST names */
char *fs_name[] = {
"",
"ProDOS",
"DOS 3.3",
"DOS 3.2",
"Pascal",
"MFS",
"HFS",
"LISA",
"CP/M",
"",
"MS-DOS",
"High Sierra",
"ISO 9660",
"AppleShare"
};
/* vfsname is an array of fsts accepted by the -t flag */
static char *vfsname[15] = {
"",
"prodos",
"dos33",
"dos32",
"pascal",
"mfs",
"hfs",
"lisa",
"cpm",
"",
"msdos",
"highsierra",
"iso9660",
"appleshare"
};
/* Each member of the vfslist array reflects if the FST is included in the
* output (as affected by the -t flag).
* 1 = display
* 0 = don't display
*/
char vfslist[15] = {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0};
/* getbsize()
*
* in: pointer to int, pointer to long
* out: pointer to char
*
* getbsize() returns a string indicative of the current value of the
* BLOCKSIZE environment variable. If BLOCKSIZE is 1k or 1024, " kbytes"
* is returned. Otherwise, " blocks" is returned. If BLOCKSIZE is NULL,
* a standard 512 byte blocksize is returned. len is the strlen of the
* returned string, always 7 in this case.
*
* BLOCKSIZE may be a plain number, in which case the number represents the
* number of bytes in a block. It may also be #k, where # represents the
* number of kilobytes in a block.
*/
char *getbsize(int *len, long *blocksize)
{
char *size;
char *p;
size = getenv("BLOCKSIZE");
if(size == NULL)
*blocksize = 512;
else {
*blocksize = strtol(size, &p, 0);
if(*p == 'k')
*blocksize *= 1024;
}
*len = 7;
if(*blocksize != 1024)
return(" blocks");
else
return(" kbytes");
}
/* makevfslist()
*
* in: string containing a comma separated list of FSTs.
* (see manpage for the exact list of recognized strings)
*
* global: char vfslist[14]
*
* vfslist is a character array. Each entry determines if the FST number
* is to be displayed in the df list or not.
*
* makevfslist() parses the input string for valid FST names. If the name
* is specified, the FST is either included or excluded from the list.
* If the string starts with "no", all FSTs are included except those present
* in the string. Otherwise, only the FSTs specified are included.
*/
void makevfslist(char *list)
{
int def, include, i;
char *p, *str;
def = 0;
include = 1;
p = list;
if(*list == 'n') {
p += 2;
include = 0;
def = 1;
}
for(i = 1; i < 14; i++)
vfslist[i] = def;
str = strtok(p, ",");
do {
for(i=1; i < 14; i++) {
if(!strcmp(str, vfsname[i])) {
vfslist[i] = include;
break;
}
}
} while((str = strtok(NULL, NULL)) != NULL);
/* Mark that makevfslist() has been run */
vfslist[14] = 0xFF;
}
/* nameinfo()
*
* in: customize statfs structure pointer
*
* out: 0 = success, -1 = failure
*
* nameinfo() check the f_mntonname field of the statfs structure and calls
* the GetDevNumber and DInfo GS/OS calls to fill in the f_mntfromname field
* and the f_type field of the statfs structure.
*/
static ResultBuf32 devName = {35};
static DInfoRecGS dInfo = {3, 0, &devName};
int nameinfo(struct statfs *sbuf)
{
GSString255 dName = {strlen(sbuf->f_mntonname)};
DevNumRecGS dNum = {2, (GSString32 *) &dName};
strcpy(&dName.text[0], sbuf->f_mntonname);
GetDevNumberGS(&dNum);
if(_toolErr)
return(-1);
dInfo.devNum = dNum.devNum;
DInfoGS(&dInfo);
if(_toolErr)
return(-1);
devName.bufString.text[devName.bufString.length] = '\0';
strcpy(sbuf->f_mntfromname, devName.bufString.text);
(sbuf->f_fsid).lo = (long) dNum.devNum;
devinfo(sbuf);
return(0);
}
/* devinfo()
*
* in: customized statfs structure pointer
*
* devinfo() takes the f_mntfromname field of the statfs structure and fills
* in the fields used by df with the results of the GSOS Volume call.
* Devices with no valid media (i.e. a 3.5" drive with no disk) are filled
* with blank values and excluded from the resulting output.
*/
static ResultBuf255 vRes = {259};
void devinfo(struct statfs *sbuf)
{
GSString32 dname = {strlen(sbuf->f_mntfromname)};
VolumeRecGS vInfo = {6, &dname, &vRes};
strcpy(dname.text, sbuf->f_mntfromname);
VolumeGS(&vInfo);
if(_toolErr) {
strcpy(sbuf->f_mntonname, "");
sbuf->f_bsize = 0;
sbuf->f_blocks = 0;
sbuf->f_bfree = sbuf->f_bavail = 0;
sbuf->f_type = 0;
} else {
vRes.bufString.text[vRes.bufString.length] = '\0';
strcpy(sbuf->f_mntonname, vRes.bufString.text);
sbuf->f_bsize = vInfo.blockSize;
sbuf->f_blocks = vInfo.totalBlocks;
sbuf->f_bfree = sbuf->f_bavail = vInfo.freeBlocks;
sbuf->f_type = vInfo.fileSysID;
}
}
/* getmntinfo()
*
* in: struct statfs **, char
*
* out: number of block devices currently online.
*
* getmntinfo() first finds out how many devices are online and how many of
* them are block devices by repeated calls to DInfo. Then it dynamically
* creates and array of statfs structures and for each block devices fills in
* an entry in the array, returning the total number of block devices present.
*/
long getmntinfo(struct statfs **mntlist, char flags)
{
int n, b, i, j;
/* First find out how many devices exist, and how many are block
devices */
b = n = 0;
while(1) {
dInfo.devNum = n+1;
DInfoGS(&dInfo);
if(_toolErr)
break;
if(dInfo.characteristics & 0x80)
b++;
n++;
}
/* Prepare the mntlist array */
if((*mntlist = (struct statfs *) malloc(sizeof(struct statfs)*b)) == NULL)
return(0L);
/* Copy the device names of each block device to the array */
for(j=0,i=1;i<=n;i++) {
dInfo.devNum = i;
DInfoGS(&dInfo);
if(dInfo.characteristics & 0x80) {
devName.bufString.text[devName.bufString.length] = '\0';
strcpy((*mntlist)[j].f_mntfromname, devName.bufString.text);
(*mntlist)[j].f_fsid.lo = (long) dInfo.devNum;
devinfo(&(*mntlist)[j++]);
}
}
return((long) b);
}

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);
}

477
bin/gsh/M/alias.mac Normal file
View File

@ -0,0 +1,477 @@
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab WriteCString &a1
&lab ph4 &a1
Tool $200c
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab dec2 &a
&lab dec &a
dec &a
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab iny2
&lab iny
iny
mend
MACRO
&lab ora2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
ora &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab asl2 &a
&lab asl &a
asl &a
mend
MACRO
&lab UDivide &a1,&a2
&lab pha
pha
ph2 &a1(1)
ph2 &a1(2)
Tool $0b0b
pl2 &a2(1)
pl2 &a2(2)
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab inx2
&lab inx
inx
mend
MACRO
&lab dey2
&lab dey
dey
mend
macro
&lab ErrWriteCString &a1
&lab ph4 &a1
Tool $210c
mend

84
bin/gsh/M/bufpool.mac Normal file
View File

@ -0,0 +1,84 @@
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab unlock &a1
&lab stz &a1
MEND
MACRO
&lab key
&lab dc i2'0'
MEND
MACRO
&lab lock &a1
&lab lda #1
tsb &a1
beq *+6
cop $7F
bra *-7
MEND
MACRO
&lab WriteCString &a1
&lab ph4 &a1
Tool $200c
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend

774
bin/gsh/M/builtin.mac Normal file
View File

@ -0,0 +1,774 @@
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab sub2 &arg1,&arg2,&dest
lclc &char
&lab sec
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .sub
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .sub
.x1
txa
ago .sub
.y1
tya
.sub
sbc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab MV2 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
macro
&lab jcs &loc
&lab bcc *+5
jmp &loc
mend
MACRO
&lab LD2 &val,&adr
&lab lcla &count
lda #&val
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab ora2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
ora &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab iny2
&lab iny
iny
mend
MACRO
&lab Dec2Int &a1,&a2
&lab pha
ph4 &a1(1)
ph2 &a1(2)
ph2 &a1(3)
Tool $280b
pl2 &a2
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab Int2Dec &a1
&lab ph2 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $260b
mend
MACRO
&lab GetPrefix &a1
&lab gsos $200A,&a1
mend
MACRO
&lab ERROR &a1
&lab p16 $105,&a1
mend
MACRO
&lab asl2 &a
&lab asl &a
asl &a
mend
MACRO
&lab LD4 &val,&adr
&lab lcla &count
lda #<&val
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda #+(&val)|-16
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
macro
&lab inc2 &a
&lab inc &a
inc &a
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab jne &loc
&lab beq *+5
jmp &loc
mend
MACRO
&lab SetPrefix &a1
&lab gsos $2009,&a1
mend
MACRO
&lab GetFileInfo &a1
&lab gsos $2006,&a1
mend
MACRO
&lab dey2
&lab dey
dey
mend
macro
&lab GetBootVol &a1
&lab gsos $2028,&a1
mend
macro
&lab Volume &a1
&lab gsos $2008,&a1
mend
macro
&lab DInfo &a1
&lab gsos $202C,&a1
mend
macro
&lab Long2Dec &a1
&lab ph4 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $270b
mend
macro
&lab LongMul &a1,&a2
&lab pha
pha
pha
pha
ph4 &a1(1)
ph4 &a1(2)
Tool $0c0b
pl4 &a2(1)
pl4 &a2(2)
mend
macro
&lab LongDivide &a1,&a2
&lab pha
pha
pha
pha
ph4 &a1(1)
ph4 &a1(2)
Tool $0d0b
pl4 &a2(1)
pl4 &a2(2)
mend
macro
&lab pl4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"<>"{",.chk
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ldy #2
pla
sta (&parm),y
ago .shorten
.chk
aif "&char"<>"[",.chk2
pla
sta &parm
ldy #2
pla
sta &parm,y
ago .shorten
.chk2
aif "&char"<>"@",.absolute
&char1 amid &parm,2,1
&char2 setc &char1
pl&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
pl&char2
ago .shorten
.absolute
pla
sta &parm
pla
sta &parm+2
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab setdebug &a1
&lab ph2 &a1
case on
jsl setdebug
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 kvmnextproc &a1
&lab ph4 &a1
case on
jsl kvmnextproc
case off
MEND
macro
&lab Int2Hex &a1
&lab ph2 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
Tool $220b
mend
MACRO
&lab kvmgetproc &a1
&lab ph2 &a1(2)
ph4 &a1(1)
case on
jsl kvmgetproc
case off
MEND
MACRO
&lab unlock &a1
&lab stz &a1
MEND
MACRO
&lab key
&lab dc i2'0'
MEND
MACRO
&lab lock &a1
&lab lda #1
tsb &a1
beq *+6
cop $7F
bra *-7
MEND
MACRO
&lab jcc &loc
&lab bcs *+5
jmp &loc
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab getuid
&lab case on
jsl getuid
case off
MEND
macro
&lab UDivide &a1,&a2
&lab pha
pha
ph2 &a1(1)
ph2 &a1(2)
Tool $0b0b
pl2 &a2(1)
pl2 &a2(2)
mend

497
bin/gsh/M/cmd.mac Normal file
View File

@ -0,0 +1,497 @@
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab iny2
&lab iny
iny
mend
MACRO
&lab Int2Dec &a1
&lab ph2 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $260b
mend
MACRO
&lab ERROR &a1
&lab p16 $105,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab LD2 &val,&adr
&lab lcla &count
lda #&val
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab and2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
and &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab asl2 &a
&lab asl &a
asl &a
mend
MACRO
&lab LD4 &val,&adr
&lab lcla &count
lda #<&val
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda #+(&val)|-16
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab jcc &loc
&lab bcs *+5
jmp &loc
mend
macro
&lab Set_Variable &a1
&lab p16 $106,&a1
mend
MACRO
&lab wait &a1
&lab ph4 &a1
case on
jsl wait
case off
MEND
MACRO
&lab pipe &a1
&lab ph4 &a1
case on
jsl pipe
case off
MEND
MACRO
&lab signal &a1
&lab ph4 &a1(2)
ph2 &a1(1)
case on
jsl signal
case off
MEND
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
macro
&lab ErrWriteCString &a1
&lab ph4 &a1
Tool $210c
mend

474
bin/gsh/M/dir.mac Normal file
View File

@ -0,0 +1,474 @@
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
macro
&lab inc2 &a
&lab inc &a
inc &a
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab sub2 &arg1,&arg2,&dest
lclc &char
&lab sec
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .sub
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .sub
.x1
txa
ago .sub
.y1
tya
.sub
sbc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab WriteCString &a1
&lab ph4 &a1
Tool $200c
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab add4 &arg1,&arg2,&dest
&lab anop
lclc &ch
&ch amid &arg2,1,1
clc
lda &arg1
adc &arg2
sta &dest
lda &arg1+2
aif "&ch"="#",.a
adc &arg2+2
ago .b
.a
adc &arg2|-16
.b
sta &dest+2
mend
MACRO
&lab GetPrefix &a1
&lab gsos $200A,&a1
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab unlock &a1
&lab stz &a1
MEND
MACRO
&lab key
&lab dc i2'0'
MEND
MACRO
&lab lock &a1
&lab lda #1
tsb &a1
beq *+6
cop $7F
bra *-7
MEND
macro
&lab ErrWriteCString &a1
&lab ph4 &a1
Tool $210c
mend
MACRO
&lab GetFileInfo &a1
&lab gsos $2006,&a1
mend
MACRO
&lab ERROR &a1
&lab p16 $105,&a1
mend
MACRO
&lab SetPrefix &a1
&lab gsos $2009,&a1
mend
MACRO
&lab Dec2Int &a1,&a2
&lab pha
ph4 &a1(1)
ph2 &a1(2)
ph2 &a1(3)
Tool $280b
pl2 &a2
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
macro
&lab inx4
&lab inx
inx
inx
inx
mend

551
bin/gsh/M/edit.mac Normal file
View File

@ -0,0 +1,551 @@
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab sub2 &arg1,&arg2,&dest
lclc &char
&lab sec
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .sub
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .sub
.x1
txa
ago .sub
.y1
tya
.sub
sbc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab eor2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
eor &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab INIT_WILDCARD &a1
&lab p16 $109,&a1
mend
MACRO
&lab NEXT_WILDCARD &a1
&lab p16 $10A,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab GetFileInfo &a1
&lab gsos $2006,&a1
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab ioctl &a1
&lab ph4 &a1(3)
ph4 &a1(2)
ph2 &a1(1)
case on
jsl ioctl
case off
MEND
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab add4 &arg1,&arg2,&dest
&lab anop
lclc &ch
&ch amid &arg2,1,1
clc
lda &arg1
adc &arg2
sta &dest
lda &arg1+2
aif "&ch"="#",.a
adc &arg2+2
ago .b
.a
adc &arg2|-16
.b
sta &dest+2
mend
MACRO
&lab LD4 &val,&adr
&lab lcla &count
lda #<&val
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda #+(&val)|-16
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab tputs &a1
&lab ph4 &a1(3)
ph2 &a1(2)
ph4 &a1(1)
case on
jsl tputs
case off
MEND
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab jne &loc
&lab beq *+5
jmp &loc
mend
MACRO
&lab LD2 &val,&adr
&lab lcla &count
lda #&val
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab READ_INDEXED &a1
&lab p16 $108,&a1
mend
MACRO
&lab jcc &loc
&lab bcs *+5
jmp &loc
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend

435
bin/gsh/M/expand.mac Normal file
View File

@ -0,0 +1,435 @@
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab WriteCString &a1
&lab ph4 &a1
Tool $200c
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab INIT_WILDCARD &a1
&lab p16 $109,&a1
mend
MACRO
&lab NEXT_WILDCARD &a1
&lab p16 $10A,&a1
mend
MACRO
&lab sub2 &arg1,&arg2,&dest
lclc &char
&lab sec
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .sub
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .sub
.x1
txa
ago .sub
.y1
tya
.sub
sbc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab dec2 &a
&lab dec &a
dec &a
mend
macro
&lab ReadLine &a1,&a2
&lab pha
ph4 &a1(1)
ph2 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $240c
pl2 &a2
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend

571
bin/gsh/M/hash.mac Normal file
View File

@ -0,0 +1,571 @@
MACRO
&lab UDivide &a1,&a2
&lab pha
pha
ph2 &a1(1)
ph2 &a1(2)
Tool $0b0b
pl2 &a2(1)
pl2 &a2(2)
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab asl2 &a
&lab asl &a
asl &a
mend
MACRO
&lab asl3 &a
&lab asl &a
asl &a
asl &a
mend
MACRO
&lab asl4 &a
&lab asl &a
asl &a
asl &a
asl &a
mend
MACRO
&lab iny2
&lab iny
iny
mend
MACRO
&lab MV2 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab Open &a1
&lab gsos $2010,&a1
mend
MACRO
&lab Close &a1
&lab gsos $2014,&a1
mend
MACRO
&lab GetDirEntry &a1
&lab gsos $201C,&a1
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab LD2 &val,&adr
&lab lcla &count
lda #&val
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab ora2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
ora &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab jge &loc
&lab bcc *+5
jmp &loc
mend
MACRO
&lab Int2Dec &a1
&lab ph2 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $260b
mend
MACRO
&lab WriteCString &a1
&lab ph4 &a1
Tool $200c
mend
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab lsr2 &a
&lab lsr &a
lsr &a
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab jne &loc
&lab beq *+5
jmp &loc
mend
MACRO
&lab iny4
&lab iny
iny
iny
iny
mend
macro
&lab inc2 &a
&lab inc &a
inc &a
mend
macro
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
macro
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
macro
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
macro
&lab ExpandPath &a1
&lab gsos $200E,&a1
mend
macro
&lab ErrWriteLine &a1
&lab ph4 &a1
Tool $1b0c
mend

592
bin/gsh/M/history.mac Normal file
View File

@ -0,0 +1,592 @@
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab iny2
&lab iny
iny
mend
MACRO
&lab ora2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
ora &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab Dec2Int &a1,&a2
&lab pha
ph4 &a1(1)
ph2 &a1(2)
ph2 &a1(3)
Tool $280b
pl2 &a2
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
MACRO
&lab Create &a1
&lab gsos $2001,&a1
mend
MACRO
&lab Open &a1
&lab gsos $2010,&a1
mend
MACRO
&lab Write &a1
&lab gsos $2013,&a1
mend
MACRO
&lab Close &a1
&lab gsos $2014,&a1
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab GSStr &string
&lab dc i2'L:&string'
dc c"&string"
mend
MACRO
&lab MV2 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab add4 &arg1,&arg2,&dest
&lab anop
lclc &ch
&ch amid &arg2,1,1
clc
lda &arg1
adc &arg2
sta &dest
lda &arg1+2
aif "&ch"="#",.a
adc &arg2+2
ago .b
.a
adc &arg2|-16
.b
sta &dest+2
mend
MACRO
&lab Destroy &a1
&lab gsos $2002,&a1
mend
MACRO
&lab NewLine &a1
&lab gsos $2011,&a1
mend
MACRO
&lab Read &a1
&lab gsos $2012,&a1
mend
MACRO
&lab jcs &loc
&lab bcc *+5
jmp &loc
mend
MACRO
&lab Int2Dec &a1
&lab ph2 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $260b
mend
MACRO
&lab sub2 &arg1,&arg2,&dest
lclc &char
&lab sec
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .sub
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .sub
.x1
txa
ago .sub
.y1
tya
.sub
sbc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab tputs &a1
&lab ph4 &a1(3)
ph2 &a1(2)
ph4 &a1(1)
case on
jsl tputs
case off
MEND

588
bin/gsh/M/invoke.mac Normal file
View File

@ -0,0 +1,588 @@
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab SetInGlobals &a1
&lab ph2 &a1(1)
ph2 &a1(2)
Tool $090c
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab GSStr &string
&lab dc i2'L:&string'
dc c"&string"
mend
MACRO
&lab MV2 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab Open &a1
&lab gsos $2010,&a1
mend
MACRO
&lab Close &a1
&lab gsos $2014,&a1
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
macro
&lab jcs &loc
&lab bcc *+5
jmp &loc
mend
MACRO
&lab LD2 &val,&adr
&lab lcla &count
lda #&val
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
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 ora2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
ora &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab jne &loc
&lab beq *+5
jmp &loc
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab PopVariables &a1
&lab p16 $117,&a1
mend
MACRO
&lab PushVariables &a1
&lab p16 $118,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab SetPrefix &a1
&lab gsos $2009,&a1
mend
MACRO
&lab GetFileInfo &a1
&lab gsos $2006,&a1
mend
MACRO
&lab unlock &a1
&lab stz &a1
MEND
MACRO
&lab key
&lab dc i2'0'
MEND
MACRO
&lab lock &a1
&lab lda #1
tsb &a1
beq *+6
cop $7F
bra *-7
MEND
macro
&lab REDIRECT &a1
&lab p16 $110,&a1
mend
MACRO
&lab fork &a1
&lab ph4 &a1
case on
jsl fork
case off
MEND
macro
&lab SetInputDevice &a1
&lab ph2 &a1(1)
ph4 &a1(2)
Tool $0f0c
mend
macro
&lab SetOutputDevice &a1
&lab ph2 &a1(1)
ph4 &a1(2)
Tool $100c
mend
MACRO
&lab tctpgrp &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl tctpgrp
case off
MEND
MACRO
&lab dup2 &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl dup2
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 NewHandle &a1,&a2
&lab pha
pha
ph4 &a1(1)
ph2 &a1(2)
ph2 &a1(3)
ph4 &a1(4)
tool $0902
pl4 &a2
mend
macro
&lab FindHandle &a1,&a2
&lab pha
pha
ph4 &a1
tool $1a02
pl4 &a2
mend
macro
&lab PtrToHand &a1
&lab ph4 &a1(1)
ph4 &a1(2)
ph4 &a1(3)
tool $2802
mend
macro
&lab pl4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"<>"{",.chk
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ldy #2
pla
sta (&parm),y
ago .shorten
.chk
aif "&char"<>"[",.chk2
pla
sta &parm
ldy #2
pla
sta &parm,y
ago .shorten
.chk2
aif "&char"<>"@",.absolute
&char1 amid &parm,2,1
&char2 setc &char1
pl&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
pl&char2
ago .shorten
.absolute
pla
sta &parm
pla
sta &parm+2
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab kill &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl kill
case off
MEND
MACRO
&lab getpgrp &a1
&lab ph2 &a1
case on
jsl getpgrp
case off
MEND
MACRO
&lab sigpause &a1
&lab ph4 &a1
case on
jsl sigpause
case off
MEND
MACRO
&lab signal &a1
&lab ph4 &a1(2)
ph2 &a1(1)
case on
jsl signal
case off
MEND

527
bin/gsh/M/jobs.mac Normal file
View File

@ -0,0 +1,527 @@
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab MV2 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab LD2 &val,&adr
&lab lcla &count
lda #&val
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab getpid
&lab case on
jsl getpid
case off
MEND
MACRO
&lab ora2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
ora &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab Dec2Int &a1,&a2
&lab pha
ph4 &a1(1)
ph2 &a1(2)
ph2 &a1(3)
Tool $280b
pl2 &a2
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab Int2Dec &a1
&lab ph2 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $260b
mend
MACRO
&lab LD4 &val,&adr
&lab lcla &count
lda #<&val
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda #+(&val)|-16
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
macro
&lab Set_Variable &a1
&lab p16 $106,&a1
mend
MACRO
&lab wait &a1
&lab ph4 &a1
case on
jsl wait
case off
MEND
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab jne &loc
&lab beq *+5
jmp &loc
mend
MACRO
&lab dey2
&lab dey
dey
mend
MACRO
&lab kill &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl kill
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 tctpgrp &a1
&lab ph2 &a1(2)
ph2 &a1(1)
case on
jsl tctpgrp
case off
MEND
MACRO
&lab sigpause &a1
&lab ph4 &a1
case on
jsl sigpause
case off
MEND
MACRO
&lab getpgrp &a1
&lab ph2 &a1
case on
jsl getpgrp
case off
MEND
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
macro
&lab jcs &loc
&lab bcc *+5
jmp &loc
mend
MACRO
&lab jcc &loc
&lab bcs *+5
jmp &loc
mend

297
bin/gsh/M/main.mac Normal file
View File

@ -0,0 +1,297 @@
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
macro
&lab ErrWriteCString &a1
&lab ph4 &a1
Tool $210c
mend
MACRO
&lab kernStatus &a1
&lab pha
ldx #$603
jsl $E10008
pl2 &a1
MEND
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab MV2 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab add4 &arg1,&arg2,&dest
&lab anop
lclc &ch
&ch amid &arg2,1,1
clc
lda &arg1
adc &arg2
sta &dest
lda &arg1+2
aif "&ch"="#",.a
adc &arg2+2
ago .b
.a
adc &arg2|-16
.b
sta &dest+2
mend

304
bin/gsh/M/orca.mac Normal file
View File

@ -0,0 +1,304 @@
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
MACRO
&lab iny2
&lab iny
iny
mend
MACRO
&lab jcc &loc
&lab bcs *+5
jmp &loc
mend
macro
&lab ExpandPath &a1
&lab gsos $200E,&a1
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
macro
&lab SET_LINFOGS &a1
&lab p16 $142,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend

374
bin/gsh/M/prompt.mac Normal file
View File

@ -0,0 +1,374 @@
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab WriteCString &a1
&lab ph4 &a1
Tool $200c
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab WriteChar &a1
&lab ph2 &a1
Tool $180c
mend
MACRO
&lab Int2Dec &a1
&lab ph2 &a1(1)
ph4 &a1(2)
ph2 &a1(3)
ph2 &a1(4)
Tool $260b
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab ReadTimeHex &a1
&lab pha
pha
pha
pha
tool $0d03
pl2 &a1(1)
pl2 &a1(2)
pl2 &a1(3)
pl2 &a1(4)
mend
MACRO
&lab pl2 &parm
lclc &char
&lab anop
aif s:longa=1,.start
rep #%00100000
.start
&char amid &parm,1,1
aif "&char"="@",.at
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
pla
sta (&parm)
ago .shorten
.absolute
pla
sta &parm
ago .shorten
.at
&char amid &parm,2,1
pl&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing Closing '}'",16
mend
MACRO
&lab sub2 &arg1,&arg2,&dest
lclc &char
&lab sec
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .sub
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .sub
.x1
txa
ago .sub
.y1
tya
.sub
sbc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab if2 &var,&rel,&val,&label
&lab ago .skip
ble
bgt
.skip
lclc &char1
lclc &char2
&char1 amid &var,1,1
&char2 amid &var,2,1
aif "&char1"="@",.index
lda &var
.cmp
cmp &val
ago .branch
.index
aif "&char2"="x",.x1
aif "&char2"="X",.x1
aif "&char2"="y",.y1
aif "&char2"="Y",.y1
ago ^cmp
.x1
cpx &val
ago .branch
.y1
cpy &val
.branch
&char1 amid &rel,1,1
aif "&char1"="@",.done
b&rel &label
.done
mend
MACRO
&lab bgt &loc
&lab beq *+4
bcs &loc
mend
MACRO
&lab ble &loc
&lab bcc &loc
beq &loc
mend
MACRO
&lab GetPrefix &a1
&lab gsos $200A,&a1
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab Str &string
&lab dc i1'L:&string'
dc c"&string"
mend
MACRO
&lab WriteString &a1
&lab ph4 &a1
Tool $1c0c
mend

405
bin/gsh/M/shell.mac Normal file
View File

@ -0,0 +1,405 @@
MACRO
&lab Quit &a1
&lab gsos $2029,&a1
mend
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab WriteCString &a1
&lab ph4 &a1
Tool $200c
mend
MACRO
&lab tool &a1
&lab ldx #&a1
jsl $e10000
mend
MACRO
&lab ph2 &parm
lclc &char
&lab anop
aif c:&parm=0,.done
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk
rep #%00100000
.chk
aif "&char"<>"{",.absolute
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
lda (&parm)
pha
ago .shorten
.absolute
lda &parm
pha
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea &parm
ago .done
.at
&char amid &parm,2,1
ph&char
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
MACRO
&lab GSStr &string
&lab dc i2'L:&string'
dc c"&string"
mend
MACRO
&lab MV2 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab Open &a1
&lab gsos $2010,&a1
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab signal &a1
&lab ph4 &a1(2)
ph2 &a1(1)
case on
jsl signal
case off
MEND
MACRO
&lab setsystemvector &a1
&lab ph4 &a1
case on
jsl setsystemvector
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 getpid
&lab case on
jsl getpid
case off
MEND
MACRO
&lab ora2 &arg1,&arg2,&dest
&lab anop
lclc &char
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
ora &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
macro
&lab ErrWriteCString &a1
&lab ph4 &a1
Tool $210c
mend
MACRO
&lab PopVariables &a1
&lab p16 $117,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
macro
&l dosin &adr
&l dc i"l:~&sysname&syscnt"
~&sysname&syscnt dc c"&adr"
mend

185
bin/gsh/M/shellutil.mac Normal file
View File

@ -0,0 +1,185 @@
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab unlock &a1
&lab stz &a1
MEND
MACRO
&lab key
&lab dc i2'0'
MEND
MACRO
&lab lock &a1
&lab lda #1
tsb &a1
beq *+6
cop $7F
bra *-7
MEND

338
bin/gsh/M/shellvar.mac Normal file
View File

@ -0,0 +1,338 @@
MACRO
&lab gsos &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab long &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi on
&t seta &t+16
ago ^c
.m
longa on
&t seta &t+32
ago ^c
.b
aif &t=0,.d
rep #&t
.d
mend
MACRO
&lab short &stat
&lab anop
lcla &t
lcla &len
lclc &ch
&t seta 0
&len seta l:&stat
.a
aif &len=0,.b
&ch amid &stat,&len,1
aif ("&ch"="x").or.("&ch"="y").or.("&ch"="i"),.i
aif ("&ch"="a").or.("&ch"="m"),.m
.c
&len seta &len-1
ago ^a
.i
longi off
&t seta &t+16
ago ^c
.m
longa off
&t seta &t+32
ago ^c
.b
aif &t=0,.d
sep #&t
.d
mend
MACRO
&lab ph4 &parm
lclc &char
lclc &char1
lclc &char2
&lab anop
&char amid &parm,1,1
aif "&char"="#",.immediate
aif "&char"="@",.at
aif s:longa=1,.chk1
rep #%00100000
.chk1
aif "&char"<>"{",.chk2
&char amid &parm,l:&parm,1
aif "&char"<>"}",.error
&parm amid &parm,2,l:&parm-2
ldy #2
lda (&parm),y
pha
lda (&parm)
pha
ago .shorten
.chk2
aif "&char"<>"[",.absolute
ldy #2
lda &parm,y
pha
lda &parm
pha
ago .shorten
.absolute
lda &parm+2
pha
lda &parm
pha
ago .shorten
.at
&char1 amid &parm,2,1
&char2 setc &char1
ph&char1
aif l:&parm<3,.chk2a
&char2 amid &parm,3,1
.chk2a
ph&char2
ago .shorten
.immediate
&parm amid &parm,2,l:&parm-1
pea +(&parm)|-16
pea &parm
ago .done
.shorten
aif s:longa=1,.done
sep #%00100000
.done
mexit
.error
mnote "Missing closing '}'",16
mend
macro
&lab MV4 &src,&adr
&lab lcla &count
lda &src
&count seta 1
.loop1
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.part2
ago ^loop1
.part2
lda &src+2
&count seta 1
.loop2
sta &adr(&count)+2
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop2
.done
mend
MACRO
&lab LD2 &val,&adr
&lab lcla &count
lda #&val
&count seta 1
.loop
sta &adr(&count)
&count seta &count+1
aif &count>c:&adr,.done
ago ^loop
.done
mend
MACRO
&lab subroutine &parms,&work
&lab anop
aif c:&work,.a
lclc &work
&work setc 0
.a
gbla &totallen
gbla &worklen
&worklen seta &work
&totallen seta 0
aif c:&parms=0,.e
lclc &len
lclc &p
lcla &i
&i seta c:&parms
.b
&p setc &parms(&i)
&len amid &p,2,1
aif "&len"=":",.c
&len amid &p,1,2
&p amid &p,4,l:&p-3
ago .d
.c
&len amid &p,1,1
&p amid &p,3,l:&p-2
.d
&p equ &totallen+3+&work
&totallen seta &totallen+&len
&i seta &i-1
aif &i,^b
.e
tsc
sec
sbc #&work
tcs
inc a
phd
tcd
phb
phk
plb
mend
MACRO
&lab return &r
&lab anop
lclc &len
aif c:&r,.a
lclc &r
&r setc 0
&len setc 0
ago .h
.a
&len amid &r,2,1
aif "&len"=":",.b
&len amid &r,1,2
&r amid &r,4,l:&r-3
ago .c
.b
&len amid &r,1,1
&r amid &r,3,l:&r-2
.c
aif &len<>2,.d
ldy &r
ago .h
.d
aif &len<>4,.e
ldx &r+2
ldy &r
ago .h
.e
aif &len<>10,.g
ldy #&r
ldx #^&r
ago .h
.g
mnote 'Not a valid return length',16
mexit
.h
aif &totallen=0,.i
lda &worklen+1
sta &worklen+&totallen+1
lda &worklen
sta &worklen+&totallen
.i
plb
pld
tsc
clc
adc #&worklen+&totallen
tcs
aif &len=0,.j
tya
.j
rtl
mend
MACRO
&lab PopVariables &a1
&lab p16 $117,&a1
mend
MACRO
&lab PushVariables &a1
&lab p16 $118,&a1
mend
MACRO
&lab p16 &a1,&a2
&lab jsl $E100A8
dc i2'&a1'
dc i4'&a2'
mend
MACRO
&lab jeq &loc
&lab bne *+5
jmp &loc
mend
MACRO
&lab READ_VARIABLE &a1
&lab p16 $10B,&a1
mend
MACRO
&lab add2 &arg1,&arg2,&dest
lclc &char
&lab clc
&char amid &arg1,1,1
aif "&char"="@",.at1
lda &arg1
ago .add
.at1
&char amid &arg1,2,1
aif "&char"="x",.x1
aif "&char"="X",.x1
aif "&char"="y",.y1
aif "&char"="Y",.y1
ago .add
.x1
txa
ago .add
.y1
tya
.add
adc &arg2
&char amid &dest,1,1
aif "&char"="@",.at2
sta &dest
ago .b
.at2
&char amid &dest,2,1
aif "&char"="x",.x2
aif "&char"="X",.x2
aif "&char"="y",.y2
aif "&char"="Y",.y2
ago .b
.x2
tax
ago .b
.y2
tay
.b
mend
MACRO
&lab iny2
&lab iny
iny
mend
MACRO
&lab ERROR &a1
&lab p16 $105,&a1
mend
macro
&lab Set_Variable &a1
&lab p16 $106,&a1
mend
MACRO
&lab READ_INDEXED &a1
&lab p16 $108,&a1
mend
macro
&lab UnsetVariable &a1
&lab p16 $115,&a1
mend
macro
&lab EXPORT &a1
&lab p16 $116,&a1
mend

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