Manual and usage updates.
[rsc] --rw-rw-r-- M 23513 glenda sys 9730 Dec 10 11:44 sys/man/1/acid
/n/sourcesdump/2005/1210/plan9/sys/man/1/acid:4,13 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/acid:4,13
.SH SYNOPSIS
.B acid
[
- .BI -l " libfile
+ .B -kqw
]
[
- .B -wq
+ .BI -l " library
] [
.B -m
.I machine
/n/sourcesdump/2005/1210/plan9/sys/man/1/acid:89,95 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/acid:89,95
Definitions in any file may override previously defined functions.
If the function
.IR acidinit ()
- is defined, it will be invoked after all modules have been loaded.
+ is defined, it will be invoked after all libraries have been loaded.
See
.IR 2c (1)
for information about creating
[rsc] --rw-rw-r-- M 23513 glenda sys 18105 Dec 10 11:44 sys/man/1/acme
/n/sourcesdump/2005/1210/plan9/sys/man/1/acme:7,12 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/acme:7,16
.B -ab
]
[
+ .B -c
+ .I ncol
+ ]
+ [
.B -f
.I varfont
]
/n/sourcesdump/2005/1210/plan9/sys/man/1/acme:15,26 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/acme:19,26
.I fixfont
]
[
- .B -c
- .I ncol
- ]
- [
.B -l
- .I file
+ .I loadfile
|
.I file
\&... ]
/n/sourcesdump/2005/1210/plan9/sys/man/1/acme:54,60 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/acme:54,60
.B -l
option, the state of the entire system is loaded
from
- .IR file ,
+ .IR loadfile ,
which should have been created by a
.B Dump
command (q.v.),
[rsc] --rw-rw-r-- M 23513 glenda sys 2737 Dec 10 11:44 sys/man/1/ascii
/n/sourcesdump/2005/1210/plan9/sys/man/1/ascii:4,16 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/ascii:4,16
.SH SYNOPSIS
.B ascii
[
- .B -8
+ .B -8cnt
]
[
- .BI -oxdb n
- ]
- [
- .B -nct
+ .B -dox
+ |
+ .B -b
+ .I n
]
[
.I text
[rsc] --rw-rw-r-- M 23513 glenda sys 10881 Dec 10 11:44 sys/man/1/awk
/n/sourcesdump/2005/1210/plan9/sys/man/1/awk:4,26 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/awk:4,35
.SH SYNOPSIS
.B awk
[
- .BI -F fs
+ .B -F
+ .I fs
]
[
- .BI -v
- .I var=value
+ .B -d
]
[
- .BI -mr n
+ .BI -mf
+ .I n
]
[
- .BI -mf n
+ .B -mr
+ .I n
]
[
+ .B -safe
+ ]
+ [
+ .B -v
+ .I var=value
+ ]
+ [
.B -f
+ .I progfile
+ |
.I prog
- [
- .I prog
]
[
.I file ...
/n/sourcesdump/2005/1210/plan9/sys/man/1/awk:30,40 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/awk:39,49
scans each input
.I file
for lines that match any of a set of patterns specified literally in
- .IR prog
+ .I prog
or in one or more files
specified as
.B -f
- .IR file .
+ .IR progfile .
With each pattern
there can be an associated action that will be performed
when a line of a
/n/sourcesdump/2005/1210/plan9/sys/man/1/awk:56,68 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/awk:65,76
.B -v
followed by
.I var=value
- is an assignment to be done before
- .I prog
+ is an assignment to be done before the program
is executed;
any number of
.B -v
options may be present.
- .B \-F
+ .B -F
.IR fs
option defines the input field separator to be the regular expression
.IR fs .
/n/sourcesdump/2005/1210/plan9/sys/man/1/awk:82,92 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/awk:90,113
.PP
To compensate for inadequate implementation of storage management,
the
- .B \-mr
+ .B -mr
option can be used to set the maximum size of the input record,
and the
- .B \-mf
+ .B -mf
option to set the maximum number of fields.
+ .PP
+ The
+ .B -safe
+ option causes
+ .I awk
+ to run in
+ ``safe mode,''
+ in which it is not allowed to
+ run shell commands or open files
+ and the environment is not made available
+ in the
+ .B ENVIRON
+ variable.
.PP
A pattern-action statement has the form
.IP
[rsc] --rw-rw-r-- M 23513 glenda sys 3784 Dec 10 11:44 sys/man/1/bc
/n/sourcesdump/2005/1210/plan9/sys/man/1/bc:4,18 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/bc:4,12
.SH SYNOPSIS
.B bc
[
- .B -c
+ .B -cdls
]
[
- .B -l
- ]
- [
- .B -s
- ]
- [
.I file ...
]
.SH DESCRIPTION
/n/sourcesdump/2005/1210/plan9/sys/man/1/bc:22,34 -
/n/sourcesdump/2005/1211/plan9/sys/man/1/bc:16,32
to 100 digits right of the decimal point.
It takes input from any files given, then reads
the standard input.
+ .PP
The
+ .B -d
+ option enables debugging output.
+ The
.B -l
- argument stands for the name
+ option stands for the name
of an arbitrary precision math library.
The
.B -s
- argument suppresses the automatic display
+ option suppresses the automatic display
of calculation results; all output is via the
.B print
command.
[rsc] --rw-rw-r-- M 23513 glenda sys 8561 Dec 10 11:44 sys/src/cmd/acid/main.c
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/acid/main.c:22,28 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/acid/main.c:22,28
void
usage(void)
{
- fprint(2, "usage: acid [-l module] [-m machine] [-qrw] [-k] [pid] [file]\n");
+ fprint(2, "usage: acid [-kqw] [-l library] [-m machine] [pid] [file]\n");
exits("usage");
}
@1134234084.0
[rsc] --rw-rw-r-- M 23513 glenda sys 10274 Dec 10 11:44 sys/man/4/acme
/n/sourcesdump/2005/1210/plan9/sys/man/4/acme:4,16 -
/n/sourcesdump/2005/1211/plan9/sys/man/4/acme:4,27
.SH SYNOPSIS
.B acme
[
+ .B -ab
+ ]
+ [
+ .B -c
+ .I ncol
+ ]
+ [
.B -f
.I varfont
- ] [
+ ]
+ [
.B -F
.I fixfont
]
[
+ .B -l
+ .I file
+ |
.I file
\&... ]
.SH DESCRIPTION
[rsc] --rw-rw-r-- M 23513 glenda sys 19621 Dec 10 11:44 sys/src/cmd/acme/acme.c
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/acme/acme.c:101,107 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/acme/acme.c:101,107
break;
default:
Usage:
- fprint(2, "usage: acme -a -c ncol -f fontname -F fixedwidthfontname -l loadfile\n");
+ fprint(2, "usage: acme [-ab] [-c ncol] [-f font] [-F fixedfont] [-l loadfile | file...]\n");
exits("usage");
}ARGEND
@1134234084.0
[rsc] --rw-rw-r-- M 23513 glenda sys 3980 Dec 10 11:44 sys/src/cmd/ascii.c
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/ascii.c:112,118 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/ascii.c:112,118
void
usage(void)
{
- fprint(2, "usage: %s [-8] [-xod | -b8] [-ncst] [--] [text]\n", argv0);
+ fprint(2, "usage: %s [-8cnt] [-dox | -b n] [text]\n", argv0);
exits("usage");
}
void
@1134234084.0
[rsc] --rw-rw-r-- M 23513 glenda sys 5281 Dec 10 11:44 sys/src/cmd/awk/main.c
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/awk/main.c:57,63 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/awk/main.c:57,63
cmdname = argv[0];
if (argc == 1) {
- fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]\n", cmdname);
+ fprintf(stderr, "Usage: %s [-F fieldsep] [-mf n] [-mr n] [-v var=value] [-f programfile | 'program'] [file ...]\n", cmdname);
exit(1);
}
signal(SIGFPE, fpecatch);
@1134234084.0
[rsc] --rw-rw-r-- M 23513 glenda sys 13455 Dec 10 11:44 sys/src/cmd/bc.y
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/bc.y:956,962 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/bc.y:956,962
sflag++;
break;
default:
- fprint(2, "Usage: bc [-l] [-c] [file ...]\n");
+ fprint(2, "Usage: bc [-cdls] [file ...]\n");
exits("usage");
}
argc--;
Remove fake malloc.
[jmk] --rw-rw-r-- M 23513 jmk sys 445 Dec 10 19:39 sys/src/cmd/7l/compat.c
[jmk] --rwxrwxr-- M 23513 glenda sys 5002 Dec 10 19:39 sys/src/cmd/7l/l.h
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/7l/l.h:286,291 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/7l/l.h:286,292
void lput(long);
void lputbe(long);
void mkfwd(void);
+ void* mysbrk(ulong);
void names(void);
void nocache(Prog*);
void noops(void);
[jmk] --rwxrwxr-- M 23513 glenda sys 372 Dec 10 19:39 sys/src/cmd/7l/mkfile
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/7l/mkfile:11,16 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/7l/mkfile:11,17
sched.$O\
span.$O\
enam.$O\
+ compat.$O\
HFILES=\
l.h\
[jmk] --rwxrwxr-- M 23513 glenda sys 22824 Dec 10 19:39 sys/src/cmd/7l/obj.c
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/7l/obj.c:1032,1038 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/7l/obj.c:1032,1038
if(thunk >= 25L*NHUNK)
nh = 25L*NHUNK;
}
- h = sbrk(nh);
+ h = mysbrk(nh);
if(h == (char*)-1) {
diag("out of memory");
errorexit();
/n/sourcesdump/2005/1210/plan9/sys/src/cmd/7l/obj.c:1316,1362 -
/n/sourcesdump/2005/1211/plan9/sys/src/cmd/7l/obj.c:1316,1319
exp = (ieee->h>>20) & ((1L<<11)-1L);
exp -= (1L<<10) - 2L;
return ldexp(fr, exp);
- }
-
- /*
- * fake malloc
- */
- void*
- malloc(ulong n)
- {
- void *p;
-
- while(n & 7)
- n++;
- while(nhunk < n)
- gethunk();
- p = hunk;
- nhunk -= n;
- hunk += n;
- return p;
- }
-
- void
- free(void *p)
- {
- USED(p);
- }
-
- void*
- calloc(ulong m, ulong n)
- {
- void *p;
-
- n *= m;
- p = malloc(n);
- memset(p, 0, n);
- return p;
- }
-
- void*
- realloc(void*, ulong)
- {
- fprint(2, "realloc called\n");
- abort();
- return 0;
}
|