
Thu Jan 29 22:17:20 MST 2004


ll.c pad.c tac.c whereis.c
revised code 
	add required includes
	add type for functions
	add prototypes as part of header (from run of cdeclist on *.c)
		see LLsrc.c files
	add returns if needed to code
	minor other revisions, as indicated by compile errors/warnings

whereis.c
this version gives information on locations of man pages, srcs, in addition
to location of binaries

sources for whereis.c available from (no copyright notice attached):
	http://www.mit.edu/afs/sipb/project/sipbsrc/src/whereis.c

can revise list of dirs searched, easily accessible in code

code revisions, in additions to updating noted above:
added lists of src, man, bin dirs to code, replacing old 4d30? stuff

589      sudo find -x /bin /sbin /usr /opt /sw /private  -name man\* -type d
-print | sed "s|/[^/][^/]*$||" | uniq >scr.bin
592      sudo find -x /bin /sbin /usr /opt /sw /private  -name man\* -type d
-print >scr.man
597      sudo find -x /bin /sbin /usr /opt /sw /private  /Users -name src
-type d -print >scr.src
599      sudo find -x /bin /sbin /usr /opt /sw /private  /Users \( -name
[Mm]akefile -o -name \*.c \) -print >scr.src.1
602      <scr.src.1 sed "s|/[^/][^/]*$||" | sort |uniq >scr.src.2
603      sort scr.src.2 scr.src |uniq >scr.src.3

scr.src used as basis for src list in code
not a good list, but ??

added $PATH list at head of scr.bin list

edited all by hand - 


wc scr.*
      72      72    1548 scr.bin.edit
      50      50    1212 scr.man.edit
      62      63    2615 scr.src
      62      63    2615 scr.src.edit
     246     248    7990 total

Tue Jan 27 12:12:44 MST 2004

----------

files moved from 4d30 local sources on iris:/B/....:
 cp -p /B/usr3/local/src/miscA.c/* miscA.c.old

li miscA.c.old
total 112
-rw-r--r--  1 jar  wheel  1496 28 Jan  1988 NOTE
-rw-r--r--  1 jar  wheel  1167 10 Sep  1987 detab.c
-rw-r--r--  1 jar  wheel  1645 17 Sep  1987 entab.c
-rw-r--r--  1 jar  wheel  2118 30 Dec  1987 expand.c
-rw-r--r--  1 jar  wheel  1154 10 Sep  1987 fold.c
-rw-r--r--  1 jar  wheel  3134 30 Dec  1987 getNAME.c
-rw-r--r--  1 jar  wheel  1076 17 Sep  1987 ll.c
-rw-r--r--  1 jar  wheel  1082  6 Sep  1987 pad.c
-rw-r--r--  1 jar  wheel   674 10 Sep  1987 rev.c
-rw-r--r--  1 jar  wheel  5977 17 Sep  1987 tac.c
-rw-r--r--  1 jar  wheel  1737 30 Dec  1987 unexpand.c
-rw-r--r--  1 jar  wheel   511 10 Sep  1987 yes.c

----------

brought over man pages and whereis.c
rlogin iris:/B

629     cp -p `rfind b  /B/usr3 tac.[1] -o ll.[1] -o pad.[1] -o
whereis.[c1]|grep -v rdb` /hosts/pbg4/Users/jar/src/miscA.c/tmp
630     li `rfind b  /B/usr3 tac.[1] -o ll.[1] -o pad.[1] -o
whereis.[c1]|grep -v rdb` /hosts/pbg4/Users/jar/src/miscA.c/tmp

$ jar@iris:/B> li `rfind b  /B/usr3 tac.[1] -o ll.[1] -o pad.[1] -o
whereis.[>
-rw-r--r--    1 jar      sys         1912 Dec 28  1987
/B/usr3/AT/usr/man/zariz/man1/whereis.1
-rw-r--r--    1 jar      sys          237 Dec 28  1987
/B/usr3/man/u_man/man1/ll.1
-rw-r--r--    1 jar      sys          375 Dec 28  1987
/B/usr3/man/u_man/man1/pad.1
-rw-r--r--    1 jar      sys         1307 Dec 28  1987
/B/usr3/man/u_man/man1/tac.1
-rw-r--r--    1 jar      sys         5476 Mar 20  1988
/B/usr3/store/src/whereis/whereis.c

/hosts/pbg4/Users/jar/src/miscA.c/tmp:
total 20
-rw-r--r--    1 jar      sys          237 Dec 28  1987 ll.1
-rw-r--r--    1 jar      sys          375 Dec 28  1987 pad.1
-rw-r--r--    1 jar      sys         1307 Dec 28  1987 tac.1
-rw-r--r--    1 jar      sys         1912 Dec 28  1987 whereis.1
-rw-r--r--    1 jar      sys         5476 Mar 20  1988 whereis.c


----------

miscA.c:

deleted two files compiled for octane not needed for macosx
both files identical code to what is in miscA.c.old
	getNAME.c
	rev.c
kept two files compiled for octane 
both files mod from 4d30 versions
	ll.c
	pad.c
added one file, from miscA.c.old
	tac.c
added man pages and one more file, whatis.c brought over from iris:/B/
rmdir ./tmp
	ll.1
	pad.1
	tac.1
	whereis.1
	whereis.c

NOTE is record of compile/mods for 4d30 and octane
NOTE1 is this file

ls -l ./ == miscA.c
total 104
-rw-r--r--   1 jar  staff  1866 14 Jan 16:21 NOTE
-rw-r--r--   1 jar  staff  3005 28 Jan 00:20 NOTE1
-rw-r--r--   1 jar  staff   237 28 Dec  1987 ll.1
-rw-r--r--   1 jar  staff  1111 14 Jan 16:21 ll.c
drwxr-xr-x  15 jar  wheel   510 27 Jan 12:13 miscA.c.old
-rw-r--r--   1 jar  staff   375 28 Dec  1987 pad.1
-rw-r--r--   1 jar  staff  1090 14 Jan 16:21 pad.c
-rw-r--r--   1 jar  staff  1307 28 Dec  1987 tac.1
-rw-r--r--   1 jar  staff  5977 17 Sep  1987 tac.c
drwxr-xr-x   8 jar  wheel   272 28 Jan 00:04 tmp
-rw-r--r--   1 jar  staff  1912 28 Dec  1987 whereis.1
-rw-r--r--   1 jar  staff  5476 20 Mar  1988 whereis.c


----------

NOTE:
on macosx:

there are std macosx utils: whereis not ok, others ok
	/usr/bin/whereis
	/usr/bin/rev
	/usr/bin/unexpand
	/usr/bin/expand
	/usr/bin/fold
	/usr/bin/rev
	/usr/bin/yes
	/usr/libexec/getNAME

there is a gnu fileutil gtac == tac - ok
	/opt/local/bin/gtac

and a fink fileutil which - ok
	/sw/bin/which

macosx has not got:
	ll, pad
		port to macosx
	deroff
		if convenient,  port to macosx
		see iris:/B/usr3/store/src/deroff
		see iris:/B/usr3/addon/usr/src/dwb/index/deroff/* 
	detab, entab
		not needed as have unexpand/expand on macsox

	old-style whereis
		port old version of whereis, with old options
		new to modify code for macosx directory hierarchy

Sun Dec 21 23:48:02 MST 1997

moved sources now compiled into irix 6.4 over to storage directory,
miscA.c.old:

expand.c
fold.c
tac.c
unexpand.c
yes.c

also, store entab.c and detab.c, as not used given expand and unexpand;
also, code is buggy, as for  ll.c

minor revision of ll.c, to take care of test on EOF

compiled:
ll.c
pad.c
rev.c
getNAME.c

moved 4 to lbin


Thu Jan 28 18:30:12 MST 1988

miscellaneous programs ported from BSD 4.3+NSF system at ua-cs
(a few from Berkeley, most local or from the net)

compiled straight:
detab
fold
pad
rev
xstr
yes
entab
ll
deroff.c (there may have been some changes-- cannot remeber;
bsd deroff needed, I believe, for style + diction or whatever)


minor changes:
tac-- 	add bcopy(s, d, l) = copy 'l' bytes s -> d, with no \0 test

whereis-- added use of ndir.h and libndir, to handle bsd directories

significant changes:
dtree--
	There is compiler dependent code in the definition of
struct entry, and thus in the macro addr(), that controls the building
of the List,Index array containing the directory information.  
TWIDDLE and next and b have to be declared as the size of pointer,
in uport s5 int for small model and long for large model.
It does not seem worthwhile to make code portable.
	Related to the above, the operation of realloc is broken by
the handling of addr() and stuct entry, ie pointer alignment problems
when realloc invoked.  Work-around = declare MAX to be max size that
will fit into a segment = max size possible with large model on 286,
and let one malloc call do it all-- no realloc.
	Buf1-Buf3 statements were removed as not needed.
	Field width declared in sprintf(sub,...in t_search.
14-character names have no \0 terminator in dir file.
	Bit fields in struct entry have to be set as integers????
Tested Device == Status.st_dev, and set addr->dev as 1 or 0 accordingly,
in t_search.



