BSD 2 development
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Thu, 19 Apr 1979 05:00:34 +0000 (21:00 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Thu, 19 Apr 1979 05:00:34 +0000 (21:00 -0800)
Work on file man/whoami.u
Work on file man/ssp.u
Work on file man/xstr.u
Work on file man/vi.u
Work on file man/tra.u
Work on file man/strings.u
Work on file man/ctags.u

Synthesized-from: 2bsd

man/ctags.u [new file with mode: 0644]
man/ssp.u [new file with mode: 0644]
man/strings.u [new file with mode: 0644]
man/tra.u [new file with mode: 0644]
man/vi.u [new file with mode: 0644]
man/whoami.u [new file with mode: 0644]
man/xstr.u [new file with mode: 0644]

diff --git a/man/ctags.u b/man/ctags.u
new file mode 100644 (file)
index 0000000..ef291b9
--- /dev/null
@@ -0,0 +1,42 @@
+.TH CTAGS UCB 2/24/79 UCB
+.SH NAME
+ctags \- compute a tags file for a C program
+.SH SYNOPSIS
+.B ctags
+name ...
+.SH DESCRIPTION
+.I Ctags
+makes a tags file for
+.IR ex (UCB)
+from the specified C programs.
+A tags file gives the locations of specified objects (in this case
+functions) in a group of files.
+Each line of the tags file contains the function name,
+the file in which it is defined, and a scanning pattern used to find
+the function definition.  These are given in separate fields on the line,
+separated by blanks or tabs.
+.SH FILES
+.DT
+tags   output tags file
+.SH SEE ALSO
+astags(UCB), ex(UCB), vi(UCB)
+.SH BUGS
+This tags program is a primitive shell script, and requires functions
+to be recognizable by their starting in the first column of
+input lines on lines ending with a `)'.
+.PP
+No way to use it to incrementally update a tags file.
+In a 
+.I makefile,
+we could move the
+.I tags
+file away and then use
+.I sort
+and
+.I uniq
+to get around this.
+.PP
+For tags to be more useful, a good
+.I ctags
+program is needed which references external and macro definitions in
+header files as well as being less sensitive to formatting.
diff --git a/man/ssp.u b/man/ssp.u
new file mode 100644 (file)
index 0000000..1eab355
--- /dev/null
+++ b/man/ssp.u
@@ -0,0 +1,29 @@
+.TH SSP UCB 2/24/79 UCB
+.SH NAME
+ssp \- limit to single spacing
+.SH SYNOPSIS
+.B ssp
+[
+.B \-
+] [
+file ...
+]
+.SH DESCRIPTION
+.I Ssp
+compresses consecutive blank lines to at most one blank line to produce
+more compact output for a \s-2CRT\s0 or to save paper on the printer.
+If the optional
+.B \-
+is given
+.I ssp
+is even more zealous, getting rid of all empty lines.
+.PP
+.I Ssp
+is useful for compressing text with blank lines onto a \s-2CRT\s0,
+and is used by
+.IR  man (1).
+.SH SEE\ ALSO
+colcrt(UCB), cr3(UCB), man(UCB)
+.SH AUTHOR
+Bill Joy
+.SH BUGS
diff --git a/man/strings.u b/man/strings.u
new file mode 100644 (file)
index 0000000..8bdfd4d
--- /dev/null
@@ -0,0 +1,39 @@
+.TH STRINGS UCB 2/24/79 UCB
+.SH NAME
+strings \- find the printable strings in a object, or other binary, file
+.SH SYNOPSIS
+.B strings
+[
+.B \-
+] [
+.B \-o
+] [
+\fB\-\fInumber\fR
+] file ...
+.SH DESCRIPTION
+.I Strings
+looks for ascii strings in a binary file.
+A string is any sequence of 4 or more printing characters ending with
+a newline or a null.
+Unless the
+.B \-
+flag is given,
+.I strings
+only looks in the initialized data space of object files.
+If the
+.B \-o
+flag is given, then each string is preceded by its offset in the
+file (in octal).
+If the
+\fB\-\fInumber\fR
+flag is given then number is used as the minimum string length
+rather than 4.
+.PP
+.I Strings
+is useful for identifying random object files and many other things.
+.SH "SEE ALSO"
+od(1)
+.SH AUTHOR
+Bill Joy
+.SH BUGS
+The algorithm for identifying strings is extremely primitive
diff --git a/man/tra.u b/man/tra.u
new file mode 100644 (file)
index 0000000..20a727b
--- /dev/null
+++ b/man/tra.u
@@ -0,0 +1,41 @@
+.TH TRA UCB 2/24/79 UCB
+.SH NAME
+tra \- copy out a file as it grows
+.SH SYNOPSIS
+.B tra
+[
+.B \-
+] [
+\-interval
+] [
++limit
+]
+file
+.SH DESCRIPTION
+.I Tra
+will copy out the contents of a file which is growing as it grows.
+It alternately copies out the new material in the file and sleeps
+for
+.I interval
+seconds, the default
+.I interval
+is 15 seconds.
+.I Limit
+can be given to limit the total running time of the
+.I tra,
+the default is effectively infinite.
+.PP
+.I Tra
+normally copies out all the text currently in the file
+before beginning to watch for new text.
+The option
+.B \-
+alone causes only new material to be given.
+.PP
+.I Tra
+is particularly useful for alternately watching the output
+file being written by a long shell script or a long-running
+program and doing real work.
+.SH AUTHOR
+Bill Joy
+.SH BUGS
diff --git a/man/vi.u b/man/vi.u
new file mode 100644 (file)
index 0000000..2a9474c
--- /dev/null
+++ b/man/vi.u
@@ -0,0 +1,75 @@
+.TH VI UCB 4/4/79 UCB
+.SH NAME
+vi \- screen oriented (visual) display editor based on ex
+.SH SYNOPSIS
+.B vi
+[
+.B \-t
+tag
+] [
+.B \-r
+] [
+\fB+\fR\fIlineno\fR
+]
+name ...
+.SH DESCRIPTION
+.I Vi
+(visual) is a display oriented text editor based on
+.IR ex (UCB).
+.I Ex
+and
+.I vi
+run the same code; it is possible to get to
+the command mode of
+.I ex
+from within
+.I vi
+and vice-versa.
+.PP
+The
+.I "Vi Quick Reference"
+card and the
+.I "Introduction to Display Editing with Vi"
+provide full details on using
+.I vi.
+.SH FILES
+See
+.IR ex (UCB).
+.SH SEE ALSO
+ex (UCB), vi (UCB), ``Vi Quick Reference'' card,
+``An Introduction to Display Editing with Vi''.
+.SH BUGS
+Scans with \fB/\fR and \fB?\fR begin on the next line,
+skipping the remainder of the current line.
+.PP
+Software tabs using \fB^T\fR work only immediately after the
+.I autoindent.
+.PP
+Left and right shifts on intelligent terminals don't make use of
+insert and delete character operations in the terminal.
+.PP
+The
+.I wrapmargin
+option can be fooled since it looks at output columns when blanks are typed.
+If a long word passes through the margin and onto the next line without a 
+break, then the line won't be broken.
+.PP
+Insert/delete within a line can be slow if tabs are present on intelligent
+terminals, since the terminals need help in doing this correctly.
+.PP
+Occasionally inverse video scrolls up into the file from a diagnostic
+on the last line.
+.PP
+Saving text on deletes in the named buffers is somewhat inefficient.
+.PP
+The
+.I source
+command does not work when executed as \fB:source\fR;
+there is no way to use the \fB:append\fR, \fB:change\fR,
+and \fB:insert\fR commands, since it is not possible to give
+more than one line of input to a \fB:\fR escape.  To use these
+on a \fB:global\fR you must \fBQ\fR to \fIex\fR command mode,
+execute them, and then reenter the screen editor with
+.I vi
+or
+.I open.
diff --git a/man/whoami.u b/man/whoami.u
new file mode 100644 (file)
index 0000000..3c9c64e
--- /dev/null
@@ -0,0 +1,17 @@
+.TH WHOAMI UCB 2/24/79 UCB
+.SH NAME
+whoami \- print effective current user id
+.SH SYNOPSIS
+.B whoami
+.SH DESCRIPTION
+.I Whoami
+prints who you are.
+It works even if you are su'd, while `who am i' does not since
+it uses /etc/utmp.
+.SH FILES
+.DT
+/etc/passwd    Name data base
+.SH "SEE ALSO"
+who (1)
+.SH AUTHOR
+Bill Joy
diff --git a/man/xstr.u b/man/xstr.u
new file mode 100644 (file)
index 0000000..3dc91a6
--- /dev/null
@@ -0,0 +1,118 @@
+.TH XSTR UCB 2/24/79 UCB
+.SH NAME
+xstr \- extract strings from C programs to implement shared strings
+.SH SYNOPSIS
+.B xstr
+[
+.B \-c
+] [
+.B \-
+] [
+file
+]
+.SH DESCRIPTION
+.I Xstr
+maintains a file
+.I strings
+into which strings in component parts of a large program are hashed.
+These strings are replaced with references to this common area.
+This serves to implement shared constant strings, most useful if they
+are also read-only.
+.PP
+The command
+.PP
+.DT
+       \fBxstr \-c\fR name
+.PP
+will extract the strings from the C source in name, replacing
+string references by expressions of the form (&xstr[number])
+for some number.
+An approporiate declaration of
+.I xstr
+is prepended to the file.
+The resulting C text is placed in the file
+.I x.c,
+to then be compiled.
+The strings from this file are placed in the
+.I strings
+data base if they are not there already.
+Repeated strings and strings which are suffices of existing strings
+do not cause changes to the data base.
+.PP
+After all components of a large program have been compiled a file
+.I xs.c
+declaring the common
+.I xstr
+space can be created by a command of the form
+.PP
+.DT
+       \fBxstr\fR
+.PP
+This
+.I xs.c
+file should then be compiled and loaded with the rest
+of the program.
+If possible, the array can be made read-only (shared) saving
+space and swap overhead.
+.PP
+.I Xstr
+can also be used on a single file.
+A command
+.PP
+.DT
+       \fBxstr\fR name
+.PP
+creates files
+.I x.c
+and
+.I xs.c
+as before, without using or affecting any
+.I strings
+file in the same directory.
+.PP
+It may be useful to run
+.I xstr
+after the C preprocessor if any macro definitions yield strings
+or if there is conditional code which contains strings
+which may not, in fact, be needed.
+.I Xstr
+reads from its standard input when the argument `\-' is given.
+An appropriate command sequence for running
+.I xstr
+after the C preprocessor is:
+.PP
+.nf
+.DT
+       \fBcc \-E\fR name.c | \fBxstr \-c\fR \-
+       \fBcc \-c\fR x.c
+       \fBmv\fR x.o name.o
+.fi
+.PP
+.I Xstr
+does not touch the file
+.I strings
+unless new items are added, thus
+.I make
+can avoid remaking
+.I xs.o
+unless truly necessary.
+.SH FILES
+.DT
+strings        Data base of strings
+.br
+x.c            Massaged C source
+.br
+xs.c           C source for definition of array `xstr'
+.br
+/tmp/xs*       Temp file when `xstr name' doesn't touch
+.I strings
+.SH "SEE ALSO"
+mkstr(UCB)
+.SH AUTHOR
+Bill Joy
+.SH BUGS
+If a string is a suffix of another string in the data base,
+but the shorter string is seen first by
+.I xstr
+both strings will be placed in the data base, when just
+placing the longer one there will do.