IMD 1.17: 25/11/2014 15:07:31 Sn: 42359 (BATWINGS) MOTOROLA PHE:8503 (C) 1984 Motorola Inc. SYSTEM V/68 is a Trademark of Motorola Inc. M68000 SOFTWARE 82NNXBSV10 B* SYSTEM V68 OBJECT Release 1, Version 2.8 DISK 26 of 27 "on-line documentation"  ) 0420-,.M~ 77 >,>,>,A0>,>,>,A0>,>,>,A0>,>,>,A`>,>,>,Af>,>,>,ہ7 88>,ā#99>,&99>,ā)99>,Ł4,99>,Ł>/99>,29 9 >,Ɓ589 9 >,Ɓ6;9 9 >,Ɓ:>99>, AD99>,ǁG99>,ǁ4J99>,ǁ6M99>,6P99>,ȁ;S99>,ȁ8V99>,Ɂ Y\_99>, $beh99>,Ɂkn99>,ʁ9q9!9!>,ʁ9t9"9">,9w9%9%>,ˁ9z9&9&>,ˁ:}9'9'>,ˁP9)9)>,99+9+>,́:9-9->,́:9/9/>,́:9191>,:9292>,́:9494>,΁99595>,΁99797>,.9999>,ρG9;9;>,ρ;9?9?>,ρ9A9A>,9C9C>,Ё9E9E>,Ё49F9F>,сG9G9H>,59I9I>,с;9J9J>,с:9L9L>,ҁ=9O9O>,f!9S9S>,Ӂ9$9T9U>,Ӂ:'9V9V>,Ӂ9*9X9X>,9-9Z9Z>,ԁ709[9[>,ԁ39]9]>,ԁ <69<?9_9_>,8B9a9a>,Ձ8E9d9d>,Ձ8H9f9f>,ց7K9h9h>, NQ9j9j>,ց rTWZ]9l9l>,ׁ`9n9n>,ׁc9p9p>,9i9r9r>,؁7l9t9t>,؁or9v9v>,ف:u9w9w>,4x99>,ف5{99>,ځ5~99>,ځ599>,499>,ہM9=9=>,A@=ع>,>,聴 99>, 99>,݁99>,݁D99>,݁99>,;99>,ށ99>,ށ99>,ށ99>,99>,߁"%(+.1499>, 7:=99>, {@CFI99>, LORUX[99>,ၴ^99>,ၴJadgjmpsv99>,⁴y|99>,U99>,⁴99>,⁴}99>,ぴk99>, F99>,ぴ99>,䁴 99>,䁴 99>,99>,側99>,側 399>,側99>,99>,恴<99>,灴99>,灴   99>,399>,A =>,>, 99>,遴|!$99>,Z'*99>,ꁴ -099>,ꁴm3699>,ꁴA999>,#<?BEHKNQT99>,끴(WZ99>,끴]`cfil99>,쁴o99>,rux{~99>,클"x99>,클 99>, S99>, c 99>,$:=99>,A @=>,>,CF99>,(IL99>,OR99>,@UX99>, [^ad99>,3g99>,j99>,m99>,1ps99>,v99>,y99>,|99>, >99>, 99>,e99>,99>, (** configuration change \(**/ \f3#define \s-1E_BLK\s+1 020\f1 /\(** block device error \(**/ \f3#define \s-1E_STRAY\s+1 030\f1 /\(** stray interrupt \(**/ \f3#define \s-1E_PRTY\s+1 031\f1 /\(** memory parity \(**/ .fi .PP Some records in the error file are of an administrative nature. These include the startup record that is entered into the file when logging is activated, the stop record that is written if the daemon is terminated ``gracefully'', and the time-change record that is used to account for changes in the system's time-of-day. These records have the following formats: .PP .TS l l l l. \f3struct\f1 \f3estart {\f1 \& \& \f3short\f1 \f3e_cpu;\f1 /\(** \s-1CPU\s+1 type \(**/ \f3struct utsname\f1 \f3e_name;\f1 /\(** system names \(**/ \f3};\f1 \& \& \& .TE .PP \f3#define eend errhdr\f1 /\(** record header \(**/ .TS l l l l. \f3struct\f1 \f3etimchg {\f1 \& \& \f3time_t\f1 \f3e_ntime;\f1 /\(** new time \(**/ \f3};\f1 .TE .PP Stray interrupts cause a record with the following format to be logged: .PP...usr .\" @(#)tempnam.3s 1.2 .so /usr/man/u_man/man3/tmpnam.3s  .TS l l l l. \f3struct\f1 \f3estray {\f1 \& \& \f3uint\f1 \f3e_saddr;\f1 /\(** stray loc or device addr \(**/ \f3};\f1 .TE .PP Generation of memory subsystem errors is not supported in this release. .PP Error records for block devices have the following format: .PP .ne 18 .ta .75i 1.0i 2.25i 3.25i .nf \f3struct eblock {\f1 .ne 16 \f3dev_t e_dev;\f1 /\(** "true" major + minor dev no \(**/ \f3physadr e_regloc;\f1 /\(** controller address \(**/ \f3short e_bacty;\f1 /\(** other block \s-1I/O\s+1 activity \(**/ \f3struct iostat {\f1 \f3long io_ops;\f1 /\(** number read/writes \(**/ \f3long io_misc;\f1 /\(** number "other" operations \(**/ \f3ushort io_unlog;\f1 /\(** number unlogged errors \(**/ \f3} e_stats;\f1 \f3short e_bflags;\f1 /\(** read/write, error, etc \(**/ \f3short e_cyloff;\f1 /\(** logical dev start cyl \(**/ \f3daddr_t e_bnum;\f1 /\(** logical block number \(**/ \f3ushort e_bytes;\f1 /\(** number bytes to transfer \(**/ \f3paddr_t e_memadd;\f1 /\(** buffer memory address ...man.\" @(#)termcap.3 1.5 .\" --- 6/30/81 .TH TERMCAP 3X .UC 4 .SH NAME tgetent, tgetnum, tgetflag, tgetstr, tgoto, tputs \- terminal independent operation routines .SH SYNOPSIS .nf .B char PC; .B char \(**BC; .B char \(**UP; .B short ospeed; .PP .BR "tgetent(" "bp, name" ) .BR "char \(**" "bp" ", \(**" name ; .PP .BR "tgetnum(" id ) .BR "char \(**" id ; .PP .BR "tgetflag(" id ) .BR "char \(**" id ; .PP .B char \(** .BR "tgetstr(" "id, area" ) .BR "char \(**" "id" ", \(**" area ; .PP .B char \(** .BR "tgoto(" "cm, destcol, destline" ) .BR "char \(**" cm ; .PP .BR "tputs(" "cp, affcnt, outc" ) .BR "register char \(**" cp ; .BR int " affcnt" ; .BR "int \(**" outc ")();" .fi .SH DESCRIPTION These functions extract and use capabilities from the terminal capability data base .IR termcap (5). Note that these are low-level routines. .PP .I Tgetent\^ extracts the entry for terminal .I name\^ into the buffer at .IR bp . .I Bp\^ should be a character buffer of size 1024 and must be retained through all subsequent calls to \(**/ \f3ushort e_rtry;\f1 /\(** number retries \(**/ \f3short e_nreg;\f1 /\(** number device registers \(**/ \f3};\f1 .fi .PP The following values are used in the .I e_bflags\^ word: .PP .ne 6 .ta 2.0i 2.5i .nf \f3#define \s-1E_WRITE\s+1 0\f1 /\(** write operation \(**/ \f3#define \s-1E_READ\s+1 1\f1 /\(** read operation \(**/ \f3#define \s-1E_NOIO\s+1 02\f1 /\(** no \s-1I/O\s+1 pending \(**/ \f3#define \s-1E_PHYS\s+1 04\f1 /\(** physical \s-1I/O\s+1 \(**/ \f3#define \s-1E_FORMAT\s+1 010\f1 /\(** Formatting Disk\(**/ \f3#define \s-1E_ERROR\s+1 020\f1 /\(** \s-1I/O\s+1 failed \(**/ .fi .SH SEE ALSO errdemon(1M). .\" @(#)errfile.4 1.7 ...u_man .IR tgetnum , .IR tgetflag , and .IR tgetstr . .I Tgetent\^ returns \-1 if it cannot open the .B termcap\^ file, 0 if the terminal name given does not have an entry, and 1 if successful. It looks in the environment for a TERMCAP variable. If a variable is found whose value does not begin with a slash and the terminal type .I name\^ is the same as the environment string TERM, the TERMCAP string is used instead of reading the \fBtermcap\fP file. If the value does begin with a slash, the string is used as a pathname rather than .BR /etc/termcap . This can speed up entry into programs that call .IR tgetent . It can also help debug new terminal descriptions or be used to make one for your terminal if you can't write the file .BR /etc/termcap . .PP .I Tgetnum\^ gets the numeric value of capability .IR id , returning \-1 if is not given for the terminal. .I Tgetflag\^ returns 1 if the specified capability is present in the terminal's entry, 0 if it is not. .I Tgetstr\^ gets the string value of capability .IR id , p'\" t .TH FILEHDR 4 .SH NAME filehdr \- file header for common object files .SH SYNOPSIS .B #include .SH DESCRIPTION Every common object file begins with a 20-byte header. The following C .B struct declaration is used: .PP .if t .RS .TS l l l l. \f3struct filehdr\f1 \& \& \f3{\f1 \& \& \& \& \f3unsigned short f_magic ;\f1 /\(** magic number \(**/ \& \f3unsigned short f_nscns ;\f1 /\(** number of sections \(**/ \& \f3long f_timdat ;\f1 /\(** time & date stamp \(**/ \& \f3long f_symptr ;\f1 /\(** file ptr to symtab \(**/ \& \f3long f_nsyms ;\f1 /\(** # symtab entries \(**/ \& \f3unsigned short f_opthdr ;\f1 /\(** sizeof(opt hdr) \(**/ \& \f3unsigned short f_flags ;\f1 /\(** flags \(**/ \f3} ;\f1 \& \& \& .TE .if t .RE .PP .I F_symptr is the byte offset into the file at which the symbol table can be found. Its value can be used as the offset in .IR fseek (3S) to position an I/O stream to the symbol table. See \fIaouthdr\fP(4) for the structure of the optional aout header. The valid magic number is: . ...man3Oman4rman5man6lacing it in the buffer at .IR area , advancing the .I area\^ pointer. It decodes the abbreviations for this field described in .IR termcap (5), except for cursor addressing and padding information. .PP .I Tgoto\^ returns a cursor addressing string decoded from .I cm\^ to go to column .I destcol\^ in line .IR destline . It uses the external variables .SM .B UP (from the \fBup\fR capability) and .SM .B BC (if \fBbc\fR is given rather than \fBbs\fR) if necessary to avoid placing \fB\en\fR, \fB^D\fR or \fB^@\fR in the returned string. (Programs that call \fItgoto\fP should be sure to turn off the .SM .B XTABS bit(s), since \fItgoto\fP may now output a tab. Note that programs using \fItermcap\fP should in general turn off .SM .B XTABS anyway since some terminals use control-I for other functions, such as nondestructive space.) If a \fB%\fR sequence is given which is not understood, then .I tgoto\^ returns \*(lqOOPS\*(rq. .PP .I Tputs\^ decodes the leading padding information of the string .IR cp ; .I affcnt\^ givif t .RS .PP .TS l1 l1p-1 l l. \f3#define MC68MAGIC 0520\f1 /\(** \*(5) magic number \(**/ .TE .if t .RE .PP The value in .I f_timdat is obtained from the .IR time (2) system call. Flag bits currently defined are: .PP .if t .RS .TS l1 l1p-1 l l. \f3#define F_RELFLG 00001\f1 /\(** relocation entries stripped \(**/ \f3#define F_EXEC 00002\f1 /\(** file is executable \(**/ \f3#define F_LNNO 00004\f1 /\(** line numbers stripped \(**/ \f3#define F_LSYMS 00010\f1 /\(** local symbols stripped \(**/ \f3#define F_MINMAL 00020\f1 /\(** minimal object file \(**/ \f3#define F_UPDATE 00040\f1 /\(** update file, ogen produced \(**/ \f3#define F_SWABD 00100\f1 /\(** file is "pre-swabbed" \(**/ \f3#define F_AR16WR 00200\f1 /\(** 16-bit DEC host \(**/ \f3#define F_AR32WR 00400\f1 /\(** 32-bit DEC host \(**/ \f3#define F_AR32W 01000\f1 /\(** non-DEC host \(**/ \f3#define F_PATCH 02000\f1 /\(** "patch" list in opt hdr \(**/ .TE .if t .RE .SH "SEE ALSO" time(2), fseek(3S), \*pa.out(4), aouthdr(4). .\" @(#)f...sgetl.3xsign.3f signal.3f sin.3f sin.3m sinh.3f sinh.3msleep.3csngl.3fsprintf.3ssputl.3xsqrt.3fsqrt.3msrand.3csrand.3fsrand48.3csscanf.3sssignal.3cstdio.3sstdipc.3cstrcat.3cstrchr.3cstrcmp.3cstrcpy.3cstrcspn.3c string.3c!strlen.3c"strncat.3c#strncmp.3c$strncpy.3c%strpbrk.3c&strrchr.3c'strspn.3c(strtok.3c)strtol.3c*swab.3c+sys_nerr.3c,system.3f-system.3s.tan.3f/tan.3m0tanh.3f1tanh.3m2tdelete.3c3tempnam.3s4termcap.35termlib.36tgetent.37tgetflag.38tgetnum.39tgetstr.3:tgoto.3;tmpfile.3stolower.3c?toupper.3c@tputs.3Atrig.3mBtsearch.3cCttyname.3cDttyslot.3c es the number of lines affected by the operation, or 1 if this is not applicable; .I outc\^ is a routine that is called with each character in turn. The external variable .I ospeed\^ should contain the output speed of the terminal as encoded by .I stty (2). The external variable .SM .B PC\^ should contain a pad character to be used (from the \fBpc\fR capability) if a null (\fB^@\fR) is inappropriate. .SH FILES .ta \w'/usr/lib/libtermcap.a 'u /usr/lib/libtermcap.a \-ltermcap library .br /etc/termcap data base .DT .SH SEE ALSO ex(1), termcap(5) .\" @(#)termcap.3 1.5 ilehdr.4 1.7 .\" @(#)sgetl.3x 1.2 .so /usr/man/u_man/man3/sputl.3x .\" @(#)termlib.3 1.1 .pl 1 The ``termlib'' library is now named ``termcap''. See ``man 3 termcap''.  '\" t .TH FS 4 .SH NAME file system \- format of system volume .SH SYNOPSIS .B #include .br .B #include .br .B #include .SH DESCRIPTION Every file system storage volume has a common format for certain vital information. Every such volume is divided into a certain number of 512-byte long sectors. Sector 0 is unused and is available to contain a bootstrap program or other information. .PP Sector 1 is the .IR superblock . The format of a superblock is: .PP .nf /\(** \(** Structure of the superblock \(**/ .TS l1 l1 l1 l. \f3struct filsys\f1 \f3{\f1 \f3ushort s_isize;\f1 /\(** size in blocks of i-list \(**/ \f3daddr_t s_fsize;\f1 /\(** size in blocks of entire volume \(**/ \f3short s_nfree;\f1 /\(** number of addresses in s_free \(**/ \f3daddr_t s_free[\s-1NICFREE\s+1];\f1 /\(** free block list \(**/ \f3short s_ninode;\f1 /\(** number of inodes in s_inode \(**/ \f3ino_t s_inode[\s-1NICINOD\s+1];\f1 /\(** free inode list \(**/ \f3char s_flock;\f1.TH SIGN 3F .SH NAME sign, isign, dsign \- FORTRAN transfer-of-sign intrinsic function .SH SYNOPSIS .nf .BR "integer" " i, j, k" .BR "real" " r1, r2, r3" .BR "double precision" " dp1, dp2, dp3" .P .RB "k" " = isign(" "i, j" ")" .RB "k" " = sign(" "i, j" ")" .P .RB "r3" " = sign(" "r1, r2" ")" .P .RB "dp3" " = dsign(" "dp1, dp2" ")" .RB "dp3" " = sign(" "dp1, dp2" ")" .SH DESCRIPTION .I Isign\^ returns the magnitude of its first argument with the sign of its second argument. .I Sign\^ and .I dsign\^ are its real and double-precision counterparts, respectively. The generic version is .IR sign , which devolves to the appropriate type depending on its arguments. .\" @(#)sign.3f 1.5 .\" @(#)tgetent.3 1.2 .so /usr/man/u_man/man3/termcap.3  /\(** lock during free list manipulation \(**/ \f3char s_ilock;\f1 /\(** lock during i-list manipulation \(**/ \f3char s_fmod;\f1 /\(** superblock modified flag \(**/ \f3char s_ronly;\f1 /\(** mounted read-only flag \(**/ \f3time_t s_time;\f1 /\(** last superblock update \(**/ \f3short s_dinfo[4];\f1 /\(** device information \(**/ \f3daddr_t s_tfree;\f1 /\(** total free blocks\(**/ \f3ino_t s_tinode;\f1 /\(** total free inodes \(**/ \f3char s_fname[6];\f1 /\(** file system name \(**/ \f3char s_fpack[6];\f1 /\(** file system pack name \(**/ \f3long s_fill[13];\f1 /\(** \s-1ADJUST\s+1 size of filsys to 512 \(**/ \f3long s_magic;\f1 /\(** magic number to indicate new file system \(**/ \f3long s_type;\f1 /\(** type of new file system \(**/ \f3};\f1 \f3#define Fs\s-1MAGIC\s+1 0xfd187e20\f1 /\(** s_magic number \(**/ \f3#define Fs1b 1\f1 /\(** 512-byte block \(**/ \f3#define Fs2b 2\f1 /\(** 1024-byte block \(**/ .TE .PP .fi .RE .I S_type\^ indicates  .TH SIGNAL 3F .SH NAME signal \- specify FORTRAN action on receipt of a system signal .SH SYNOPSIS .nf .BR "integer" " i" .BR "external integer " "intfnc" .P .BR "call signal(" "i, intfnc" ")" .SH DESCRIPTION .I Signal\^ allows a process to specify a function to be invoked upon receipt of a specific signal. The first argument specifies a fault or exception; the second argument specifies the function to be invoked. .SH SEE ALSO kill(2), signal(2). .\" @(#)signal.3f 1.6 .\" @(#)tgetflag.3 1.2 .so /usr/man/u_man/man3/termcap.3 the file system type. Currently, two types of file systems are supported: the original 512-byte oriented and the new improved 1024-byte oriented. .I S_magic\^ is used to distinguish the original 512-byte oriented file systems from the newer file systems. If this field is not equal to the magic number, .IR Fs\s-1MAGIC\s+1 , the type is assumed to be .IR Fs1b ; otherwise the .I s_type\^ field is used. In the following description, a block is then determined by the type. For the original 512-byte oriented file system, a block is 512 bytes. For the 1024-byte oriented file system, a block is 1024 bytes or two sectors. The operating system takes care of all conversions from logical block numbers to physical sector numbers. .PP .I S_isize\^ is the address of the first data block after the i-list; the i-list starts just after the super-block, namely in block 2; thus the i-list is \f2s_isize\^\fP\-2 blocks long. .I S_fsize\^ is the first block not potentially available for allocation to a file. These numbers are used .TH SIN 3F .SH NAME sin, dsin, csin \- FORTRAN sine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .BR "complex" " cx1, cx2" .P .RB "r2" " = sin(" "r1" ")" .P .RB "dp2" " = dsin(" "dp1" ")" .RB "dp2" " = sin(" "dp1" ")" .P .RB "cx2" " = csin(" "cx1" ")" .RB "cx2" " = sin(" "cx1" ")" .SH DESCRIPTION .I Sin\^ returns the real sine of its real argument. .I Dsin\^ returns the double-precision sine of its double-precision argument. .I Csin\^ returns the complex sine of its complex argument. The generic .I sin\^ function becomes .I dsin\^ or .I csin\^ as required by argument type. .SH SEE ALSO trig(3M). .\" @(#)sin.3f 1.5  .\" @(#)tgetnum.3 1.2 .so /usr/man/u_man/man3/termcap.3 by the system to check for bad block numbers; if an ``impossible'' block number is allocated from the free list or is freed, a diagnostic is written on the on-line console. Moreover, the free array is cleared, so as to prevent further allocation from a presumably corrupted free list. .PP The free list for each volume is maintained as follows. The .I s_free\^ array contains, in .IR s_free [1], \&.\|.\|., .IR s_free [ s_nfree \-1], up to 49 numbers of free blocks. .IR S_free [0] is the block number of the head of a chain of blocks constituting the free list. The first long in each free-chain block is the number (up to 50) of free-block numbers listed in the next 50 longs of this chain member. The first of these 50 blocks is the link to the next member of the chain. To allocate a block: decrement .IR s_nfree , and the new block is .IR s_free [ s_nfree ]. If the new block number is 0, there are no blocks left, so give an error. If .I s_nfree\^ became 0, read in the block named by the new block number, replace .I .\" @(#)sin.3m 1.2 .so /usr/man/u_man/man3/trig.3m .\" @(#)tgetstr.3 1.2 .so /usr/man/u_man/man3/termcap.3  s_nfree\^ by its first word, and copy the block numbers in the next 50 longs into the .I s_free\^ array. To free a block, check if .I s_nfree\^ is 50; if so, copy .I s_nfree\^ and the .I s_free\^ array into it, write it out, and set .I s_nfree\^ to 0. In any event set .IR s_free [ s_nfree ] to the freed block's number and increment .IR s_nfree . .PP .I S_tfree\^ is the total free blocks available in the file system. .PP .I S_ninode\^ is the number of free i-numbers in the .I s_inode\^ array. To allocate an inode: if .I s_ninode\^ is greater than 0, decrement it and return .IR s_inode [ s_ninode ]. If it was 0, read the i-list and place the numbers of all free inodes (up to 100) into the .I s_inode\^ array, then try again. To free an inode, provided .I s_ninode\^ is less than 100, place its number into .IR s_inode [ s_ninode ] and increment .IR s_ninode . If .I s_ninode\^ is already 100, do not bother to enter the freed inode into any table. This list of inodes is only to speed up the allocation process; the i.TH SINH 3F .SH NAME sinh, dsinh \- FORTRAN hyperbolic sine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = sinh(" "r1" ")" .P .RB "dp2" " = dsinh(" "dp1" ")" .RB "dp2" " = sinh(" "dp1" ")" .SH DESCRIPTION .I Sinh\^ returns the real hyperbolic sine of its real argument. .I Dsinh\^ returns the double-precision hyperbolic sine of its double-precision argument. The generic form .I sinh\^ may be used to return a double-precision value given a double-precision argument. .SH SEE ALSO sinh(3M). .\" @(#)sinh.3f 1.4 .\" @(#)tgoto.3 1.2 .so /usr/man/u_man/man3/termcap.3 nformation as to whether the inode is really free or not is maintained in the inode itself. .PP .I S_tinode\^ is the total free inodes available in the file system. .PP .I S_flock\^ and .I s_ilock\^ are flags maintained in the core copy of the file system while it is mounted and their values on disk are immaterial. The value of .I s_fmod\^ on disk is likewise immaterial; it is used as a flag to indicate that the super-block has changed and should be copied to the disk during the next periodic update of file system information. .PP .I S_ronly\^ is a read-only flag to indicate write-protection. .PP .I S_time\^ is the last time the super-block of the file system was changed, and is the number of seconds that have elapsed since 00:00 Jan. 1, 1970 (\s-1GMT\s+1). During a reboot, the .I s_time\^ of the super-block for the root file system is used to set the system's idea of the time. .PP .I S_fname\^ is the name of the file system and .I s_fpack\^ is the name of the pack. .PP I-numbers begin at 1, and the storage f .TH SINH 3M .SH NAME sinh, cosh, tanh \- hyperbolic functions .SH SYNOPSIS .B #include .PP .BR "double sinh (" x ) .br .BR double " x" ; .PP .BR "double cosh (" x ) .br .BR double " x" ; .PP .BR "double tanh (" x ) .br .BR double " x" ; .SH DESCRIPTION .IR Sinh , .IR cosh , and .I tanh\^ return, respectively, the hyberbolic sine, cosine, and tangent of their argument. .SH DIAGNOSTICS .I Sinh\^ and .I cosh\^ return .SM .B HUGE when the correct value would overflow and set .I errno\^ to .SM .B ERANGE. .PP These error-handling procedures may be changed with the function .IR matherr (3M). .SH SEE ALSO matherr(3M). .\" @(#)sinh.3m 1.5 .TH TMPFILE 3S .SH NAME tmpfile \- create a temporary file .SH SYNOPSIS .B #include .PP .B .SM FILE .B "\(**tmpfile (\|)" .SH DESCRIPTION .I Tmpfile\^ creates a temporary file and returns a corresponding .SM FILE pointer. The file is automatically deleted when the process using it terminates. The file is opened for update. .SH SEE ALSO creat(2), unlink(2), fopen(3S), mktemp(3C), tmpnam(3S). .\" @(#)tmpfile.3s 1.3 or inodes begins in block 2. Also, inodes are 64 bytes long. Inode 1 is reserved for future use. Inode 2 is reserved for the root directory of the file system, but no other i-number has a built-in meaning. Each inode represents one file. For the format of an inode and its flags, see .IR inode (4). .SH FILES /usr/include/sys/filsys.h .br /usr/include/sys/stat.h .SH SEE ALSO fsck(1M), fsdb(1M), mkfs(1M), inode(4). .\" @(#)fs.4 1.7 .TH SLEEP 3C .SH NAME sleep \- suspend execution for interval .SH SYNOPSIS .BR "unsigned sleep (" seconds ) .br .BR "unsigned" " seconds" ; .SH DESCRIPTION .I Sleep\^ suspends the current process from execution for the number of .I seconds\^ specified by the argument. The actual suspension time may be less than that requested for two reasons: (1) scheduled wakeups occur at fixed 1-second intervals, (on the second, according to an internal clock) and (2) any caught signal will terminate .I sleep\^ following execution of the signal catching routine. The suspension time may be longer than requested by an arbitrary amount, due to the scheduling of other activity in the system. The value returned by .I sleep\^ is the ``unslept'' amount (the requested time minus the time actually slept) in case the caller had an alarm set to go off earlier than the end of the requested .I sleep\^ time or in case there is premature arousal due to another caught signal. .PP The routine is implemented by setting an alarm signal and  .TH TMPNAM 3S .SH NAME tmpnam, tempnam \- create a name for a temporary file .SH SYNOPSIS .B #include .PP .BR "char \(**tmpnam (" s ) .br .BR "char \(**" s ; .PP .BR "char \(**tempnam (" "dir, pfx" ) .br .BR "char \(**" "dir" ", \(**" pfx ; .SH DESCRIPTION These functions generate filenames that can safely be used for a temporary file. .PP .I Tmpnam\^ always generates a filename using the pathname defined as .I P_tmpdir in the .B \^ header file. If .I s\^ is .SM NULL, .I tmpnam\^ leaves its result in an internal static area and returns a pointer to that area. The next call to .I tmpnam\^ will destroy the contents of the area. If .I s\^ is not .SM NULL, it is assumed to be the address of an array of at least .I L_tmpnam bytes, where .I L_tmpnam is a constant defined in .BR ; .I tmpnam\^ places its result in that array and returns .IR s . .P .I Tempnam\^ allows the user to control the choice of a directory. The argument .I dir\^ points to the pathname of the directory in which the .TH FSPEC 4 .SH NAME fspec \- format specification in text files .SH DESCRIPTION It is sometimes convenient to maintain text files on the \*(6) operating system with non-standard tabs, (i.e., tabs which are not set at every eighth column). Such files must generally be converted to a standard format, frequently by replacing all tabs with the appropriate number of spaces, before they can be processed by operating system commands. A format specification occurring in the first line of a text file specifies how tabs are to be expanded in the remainder of the file. .PP A format specification consists of a sequence of parameters separated by blanks and surrounded by the brackets \fB<:\fP and \fB:>\fP. Each parameter consists of a keyletter, possibly followed immediately by a value. The following parameters are recognized: .PP .RS 2 .TP 9 \fBt\fItabs\fR The .B t parameter specifies the tab settings for the file. The value of .I tabs\^ must be one of the following: .RE .RS 13 .TP 3 1. a list of column numbers separatepausing until it (or some other signal) occurs. The previous state of the alarm signal is saved and restored. The calling program may have set up an alarm signal before calling .IR sleep . If the .I sleep\^ time exceeds the time before the alarm signal, the process sleeps only until the alarm signal would have occurred and the caller's alarm catch routine is executed just before the .I sleep\^ routine returns. If the .I sleep\^ time is less than the time before the calling program's alarm, the prior alarm time is reset to go off at the same time it would have without the intervening .IR sleep . .SH "SEE ALSO" alarm(2), pause(2), signal(2). .\" @(#)sleep.3c 1.4 file is to be created. If .I dir\^ is .SM NULL or points to a string which is not a pathname for an appropriate directory, the pathname defined as .I P_tmpdir\^ in the .B \^ header file is used. If that pathname is not accessible, .B /tmp will be used as a last resort. This entire sequence can be upstaged by providing an environment variable .SM .B TMPDIR in the user's environment, whose value is a pathname for the desired temporary-file directory. .P Many applications prefer that names of temporary files contain favorite initial letter sequences. Use the .I pfx\^ argument for this. This argument may be .SM NULL or point to a string of up to 5 characters to be used as the first few characters of the name of the temporary file. .P .I Tempnam\^ uses .IR malloc (3C) to get space for the constructed filename and returns a pointer to this area. Thus, any pointer value returned from .I tempnam\^ may serve as an argument to .I free\^ (see .IR malloc (3C)). If .I tempnam\^ cannot return the expected result  d by commas, indicating tabs set at the specified columns; .TP 2. a \fB\-\fP followed immediately by an integer .IR n , indicating tabs at intervals of .I n\^ columns; .TP 3. a \fB\-\fP followed by the name of a ``canned'' tab specification. .PP .RE .RS 11 Standard tabs are specified by \fBt\-8\fP, or equivalently, .BR t1,9,17,25, etc. The canned tabs which are recognized are defined by the .IR tabs (1) command. .RE .PP .RS 2 .TP 9 \fBs\fIsize\fR The .B s parameter specifies a maximum line size. The value of .I size\^ must be an integer. Size checking is performed after tabs have been expanded, but before the margin is prepended. .PP .RE .RS 2 .TP 9 \fBm\fImargin\fR The .B m parameter specifies a number of spaces to be prepended to each line. The value of .I margin\^ must be an integer. .PP .RE .RS 2 .TP 9 \fBd\fR The .B d parameter takes no value. Its presence indicates that the line containing the format specification is to be deleted from the converted file. .PP .RE .RS 2 .TP 9 \fBe\fR The .B e parameter .\" @(#)sngl.3f 1.2 .so /usr/man/u_man/man3/ftype.3f for any reason (i.e., .I malloc\^ failed or attempts to find an appropriate directory were unsuccessful), a .SM NULL pointer will be returned. .SH NOTES These functions generate a different filename each time they are called. .P Files created using these functions and either .IR fopen (2) or .IR creat (2) are temporary only in the sense that they reside in a directory intended for temporary use and their names are unique. It is the user's responsibility to use .IR unlink (2) to remove the file when its use is ended. .SH SEE ALSO creat(2), unlink(2), fopen(3S), malloc(3C), mktemp(3C), tmpfile(3S). .SH BUGS If called more than 17,576 times in a single process, \fItmpnam\fP and \fItempnam\fP will start recycling previously used names. .br Between the time a filename is created and the file is opened, it is possible for some other process to create a file with the same name. This can never happen if that other process is using \fItmpnam\fP, \fItempnam\fP, or .IR mktemp (3C) and the filenames are chosen carefully takes no value. Its presence indicates that the current format is to prevail only until another format specification is encountered in the file. .RE .i0 .PP Default values, which are assumed for parameters not supplied, are \fBt\-8\fP and \fBm0\fP. If the .B s parameter is not specified, no size checking is performed. If the first line of a file does not contain a format specification, the above defaults are assumed for the entire file. The following is an example of a line containing a format specification: .PP .RS 6 \f3\(** <:t5,10,15 s72:> \(**\f1 .RE .i0 .PP If a format specification can be disguised as a comment, it is not necessary to code the .B d parameter. .PP .SH SEE ALSO ed(1), newform(1), tabs(1). .\" @(#)fspec.4 1.4  .\" @(#)sprintf.3s 1.2 .so /usr/man/u_man/man3/printf.3s to avoid duplication by other means. .\" @(#)tmpnam.3s 1.5 .TH GETTYDEFS 4 .SH NAME gettydefs \- speed and terminal settings used by getty .SH DESCRIPTION The .B /etc/gettydefs file contains information used by .IR getty (1M) to set up the speed and terminal settings for a line. It supplies information on what the .I login prompt should look like. It also supplies the speed to try next if the user indicates the current speed is not correct by typing a .I character. .PP Each entry in .B /etc/gettydefs has the following format: .PP label# initial-flags # final-flags # login-prompt #next-label .PP Each entry is followed by a blank line. Lines that begin with .B # are ignored and may be used to comment the file. The format fields can contain quoted characters of the form .BR \eb , .BR \en , .BR \ec , etc., as well as .BI \e nnn\fR,\fP where .I nnn is the octal value of the desired character. The fields are: .TP \w'login-prompt\ \ \ 'u .I label This is the string against which .IR getty (1M) tries to match its second argument. It is often the speed at which the t.TH SPUTL 3X .SH NAME sputl, sgetl \- access long integer data in a machine independent fashion. .SH SYNOPSIS .nf .BR "void sputl (" "value, buffer" ) .BR long " value" ; .BR "char \(**" buffer ; .PP .BR "long sgetl (" "buffer" ) .BR "char \(**" buffer ; .fi .SH DESCRIPTION .PP .I Sputl\^ takes the 4 bytes of the long integer .I value and places them in memory, starting at the address pointed to by .IR buffer . The ordering of the bytes is the same across all machines. .PP .I Sgetl retrieves the 4 bytes in memory, starting at the address pointed to by .IR buffer , and returns the long integer value in the byte ordering of the host machine. .PP Use of .I sputl and .I sgetl in combination provides a machine independent way of storing long numeric data in a file in binary form without conversion to characters. .PP A program that uses these functions must be loaded with the object file access routine library .ie '\*p'' \{\ .BR libld.a . \} .el \{\ .BR \s-1LIBDIR\s+1\/libld.a . \} .SH SEE ALSO ar(4). .\" @(#)sp .\" @(#)toascii.3c 1.2 .so /usr/man/u_man/man3/conv.3c erminal is supposed to run, e.g., 1200, but it needn't be. If .IR getty (1M) is called without a second argument, then the first entry of .B /etc/gettydefs is used, thus making the first entry of .B /etc/gettydefs the default entry. The first entry is also used if .IR getty (1M) can't find the specified .IR label . If .B /etc/gettydefs itself is missing, there is one entry built into the command which will bring up a terminal at \fB300\fP baud. .TP .I initial-flags These flags are the initial .IR ioctl (2) settings to which the terminal is to be set if a terminal type is not specified to .IR getty (1M). .IR Getty (1M) understands the symbolic names specified in .B /usr/include/sys/termio.h (see .IR termio (7). Normally only the speed flag is required in the .IR initial-flags " field." .IR Getty (1M) automatically sets the terminal to raw input mode and takes care of most of the other flags. The \fIinitial-flag\fP settings remain in effect until .IR getty (1M) executes .IR login (1). .TP .I final-flags These utl.3x 1.5 .\" @(#)tolower.3c 1.2 .so /usr/man/u_man/man3/conv.3c   flags take the same values as the .I initial-flags and are set just before .IR getty (1M) executes .IR login (1). The speed flag is again required. The composite flag .SM .B SANE takes care of most of the other flags that need to be set so that the processor and terminal communicate in a rational fashion. The other two commonly specified .I final-flags are .SM .B TAB3\*S (tabs are sent to the terminal as spaces) and .SM .B HUPCL\*S (the line is hung up on the final close). .TP .I login-prompt This entire field is printed as the \fIlogin-prompt\fP. White-space characters (space, tab, and new-line) are included in this field, unlike the other fields in which white space is ignored. .TP .I next-label This field indicates the next entry .I label in the table that .IR getty (1M) should use if the user types a .I or the input cannot be read. Usually, a series of speeds are linked together in a closed set. No matter where the set is entered, the correct speed can be obtained. For example, \fB2400\fP is lin.TH SQRT 3F .SH NAME sqrt, dsqrt, csqrt \- FORTRAN square root intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .BR "complex" " cx1, cx2" .P .RB "r2" " = sqrt(" "r1" ")" .P .RB "dp2" " = dsqrt(" "dp1" ")" .RB "dp2" " = sqrt(" "dp1" ")" .P .RB "cx2" " = csqrt(" "cx1" ")" .RB "cx2" " = sqrt(" "cx1" ")" .SH DESCRIPTION .I Sqrt\^ returns the real square root of its real argument. .I Dsqrt\^ returns the double-precision square root of its double-precision arguement. .I Csqrt\^ returns the complex square root of its complex argument. .IR Sqrt , the generic form, will become .I dsqrt\^ or .I csqrt\^ as required by its argument type. .SH SEE ALSO exp(3M). .\" @(#)sqrt.3f 1.4 .\" @(#)toupper.3c 1.2 .so /usr/man/u_man/man3/conv.3c ked to \fB1200\fP, which in turn is linked to \fB300\fP, which finally is linked to \fB2400\fP. .PP After making or modifying .BR /etc/gettydefs , it is strongly recommended that the file be run through .IR getty (1M) with the check option to be sure there are no errors. .SH FILES /etc/gettydefs .SH "SEE ALSO" getty(1M), termio(7), login(1), ioctl(2). .\" @(#)gettydefs.4 1.4   .\" @(#)sqrt.3m 1.2 .so /usr/man/u_man/man3/exp.3m .\" @(#)tputs.3 1.2 .so /usr/man/u_man/man3/termcap.3 .hw textangle .TH GPS 4 .SH NAME gps \- graphical primitive string, format of graphical files .SH DESCRIPTION \s-1GPS\s+1 is a format used to store graphical data. Several routines have been developed to edit and display \s-1GPS\s+1 files on various devices. Also, higher level graphics programs such as \fIplot\fR (in \fIstat\|\fR(1G)\^) and \fIvtoc\fR (in \fItoc\^\fR(1G)\^) produce \s-1GPS\s+1 format output files. .PP A \s-1GPS\s+1 is composed of five types of graphical data or primitives. .SS \fB\s-1GPS PRIMITIVES\s+1\fP .TP 10 \fBlines\f The \fIlines\fR primitive has a variable number of points from which zero or more connected line segments are produced. The first point given produces a \fImove\fR to that location. (A \fImove\fR is a relocation of the graphic cursor without drawing.) Successive points produce line segments from the previous point. Parameters are available to set \fIcolor\fR, \fIweight\fR, and \fIstyle\fR (see below). .s1 .TP 10 \fBarc\fR The \fIarc\fR primitive has a variable number of .\" @(#)srand.3c 1.2 .so /usr/man/u_man/man3/rand.3c   .TH TRIG 3M .SH NAME sin, cos, tan, asin, acos, atan, atan2 \- trigonometric functions .SH SYNOPSIS .B #include .PP .BR "double sin (" x ) .br .BR "double" " x" ; .PP .BR "double cos (" x ) .br .BR double " x" ; .PP .BR "double tan (" x ) .br .BR double " x" ; .PP .BR "double asin (" x ) .br .BR double " x" ; .PP .BR "double acos (" x ) .br .BR double " x" ; .PP .BR "double atan (" x ) .br .BR "double" " x" ; .PP .BR "double atan2 (" "y, x" ) .br .BR double " x, y" ; .SH DESCRIPTION .IR Sin , .IR cos , and .I tan\^ return, respectively, the sine, cosine, and tangent of their argument, which is in radians. .PP .I Asin\^ returns the arcsine of .IR x , in the range \-\(*p/2 to \(*p/2. .PP .I Acos\^ returns the arccosine of .IR x , in the range 0 to \(*p. .PP .I Atan\^ returns the arctangent of .IR x , in the range \-\(*p/2 to \(*p/2. .PP .I Atan2\^ returns the arctangent of .IR y / x , in the range \-\(*p to \(*p, using the signs of both arguments to determine the quadrant of the return value. .SH DIAGpoints to which a curve is fit. The first point produces a \fImove\fR to that point. If only two points are included, a line connecting the points will result. If three points are included, a circular arc through the points is drawn. If more than three points are included, lines connect the points. (In the future, a spline will be fit to the points if they number greater than three.) Parameters are available to set \fIcolor, weight,\fR and \fIstyle\fR. .s1 .TP 10 \fBtext\fR The \fItext\fR primitive draws characters. It requires a single point which locates the center of the first character to be drawn. Parameters are \fIcolor\fR, \fIfont\fR, \fItextsize\fR, and \fItextangle\fR. .s1 .TP 10 \fBhardware\fR The \fIhardware\fR primitive draws hardware characters or gives control commands to a hardware device. A single point locates the beginning location of the \fIhardware\fR string. .TP 10 \fBcomment\fR A \fIcomment\fR is an integer string that is included in a \s-1GPS\s+1 file but causes nothing to be di.\" @(#)srand.3f 1.2 .so /usr/man/u_man/man3/rand.3f NOSTICS .IR Sin , .IR cos , and .I tan\^ lose accuracy when their argument is far from zero. For arguments sufficiently large, these functions return 0 when there would otherwise be a complete loss of significance. In this case a message indicating TLOSS error is printed on the standard error output. For less extreme arguments, a PLOSS error is generated but no message is printed. In both cases, .I errno\^ is set to .SM .BR ERANGE . .PP .I Tan\^ returns .SM .B HUGE for an argument which is near an odd multiple of \(*p/2 when the correct value would overflow; it sets .I errno\^ to .SM .BR ERANGE . .PP Arguments of magnitude greater than 1.0 cause .I asin\^ and .I acos\^ to return 0 and to set .I errno\^ to .SM .BR EDOM . In addition, a message indicating DOMAIN error is printed on the standard error output. .PP These error-handling procedures may be changed with the function .IR matherr (3M). .SH SEE ALSO matherr(3M). .\" @(#)trig.3m 1.4   splayed. All \s-1GPS\s+1 files begin with a comment of zero length. .RE .SS \fB\s-1GPS PARAMETERS\s+1\fP .TP 10 \fBcolor\fR \fIColor\fR is an integer value set for \fIarc, lines,\fR and \fItext\fR primitives. .TP 10 \fBweight\fR \fIWeight\fR is an integer value set for \fIarc\fR and \fIlines\fR primitives to indicate line thickness. The value \fB0\fR is narrow weight, \fB1\fR is bold weight, and \fB2\fR is medium weight. .TP 10 \fBstyle\fR \fIStyle\fR is an integer value set for \fIlines\fR and \fIarc\fR primitives to give one of the five different line styles that can be drawn on Tektronix 4010 series storage tubes. They are: .br \fB0\fR solid .br \fB1\fR dotted .br \fB2\fR dot dashed .br \fB3\fR dashed .br \fB4\fR long dashed .br .TP 10 \fBfont\fR An integer value set for \fItext\fR primitives to designate the text font to be used in drawing a character string. (Currently \fIfont\fR is expressed as a 4-bit \fIweight\fR value followed by a 4-bit \fIstyle\fR value.) .TP 10 \fBtexts.\" @(#)srand48.3c 1.2 .so /usr/man/u_man/man3/drand48.3c .TH TSEARCH 3C .SH NAME tsearch, tdelete, twalk \- manage binary search trees .SH SYNOPSIS .B #include .PP .BR "char \(**tsearch ((char \(**)" " key" ", (char \(**\(**)" " rootp, compar" ")" .br .BR "int (\(**" "compar" ")( );" .PP .BR "char \(**tdelete ((char \(**)" " key" ", (char \(**\(**)" " rootp, compar" ")" .br .BR "int (\(**" "compar" ")( );" .PP .BR "void twalk ((char \(**)" " root, action" ")" .br .BR "void (\(**" "action" ")( );" .SH DESCRIPTION .I Tsearch\^ is a binary tree search routine generalized from Knuth (6.2.2) Algorithm T. It returns a pointer into a tree indicating where data may be found. If the data does not occur, it is added at an appropriate point in the tree. .I Key\^ points to the data to be sought in the tree. .I Rootp\^ points to a variable that points to the root of the tree. A .SM NULL pointer value for the variable denotes an empty tree; in this case, the variable is set to point to the data at the root of the new tree. .I Compar\^ is the name of the comparison fuize\fR \fITextsize\fR is an integer value used in \fItext\fR primitives to express the size of the characters to be drawn. \fITextsize\fR represents the height of characters in absolute \fIuniverse-units\fR and is stored at one-fifth this value in the size-orientation (\fIso\fR) word (see below). .TP 10 \fBtextangle\fR \fITextangle\fR is a signed integer value used in \fItext\fR primitives to express rotation of the character string around the beginning point. \fITextangle\fR is expressed in degrees from the positive x-axis and can be a positive or negative value. It is stored in the size-orientation (\fIso\fR) word as a value 256/360 of its absolute value. .RE .SS \fB\s-1ORGANIZATION\s+1\fP \s-1GPS\s+1 primitives are organized internally as follows: .PP .TS l l. \fBlines\fR \fIcw\fR \fIpoints\fR \fIsw\fR \fBarc\fR \fIcw\fR \fIpoints\fR \fIsw\fR \fBtext\fR \fIcw\fR \fIpoint\fR \fIsw\fR \fIso\fR [\fIstring\|\fR] \fBhardware\fR \fIcw\fR \fIpoint\fR [\fIstring\|\fR] \fBcomment\fR \fIcw\fR [\fIstri  .\" @(#)sscanf.3s 1.2 .so /usr/man/u_man/man3/scanf.3s nction. It is called with two arguments that point to the elements being compared. If the first argument is to be considered less than, equal to, or greater than the second argument, the function must return an integer less than, equal to, or greater than zero, respectively. .PP .I Tdelete\^ deletes a node from a binary search tree. It is generalized from Knuth (6.2.2) algorithm D. The arguments are the same as for .IR tsearch . The variable pointed to by .I rootp\^ will be changed if the deleted node was the root of the tree. .I Tdelete\^ returns a pointer to the parent of the deleted node or a .SM NULL pointer if the node is not found. .PP .I Twalk\^ traverses a binary search tree. .I Root\^ is the root of the tree to be traversed. Any node in a tree may be used as the root for a walk below that node. .I Action\^ is the name of a routine to be invoked at each node. This routine is, in turn, called with three arguments. The first argument is the address of the node being visited. The second argument is a vang\|\fR] .TE .TP 10 \fBcw\fR \fICw\fR is the control word and begins all primitives. It consists of 4 bits that contain a primitive-type code and 12 bits that contain the word-count for that primitive. .TP 10 \fBpoint\fR(\fBs\fR) \fIPoint\fR(\fIs\fR\|)\fR is one or more pairs of integer coordinates. \fIText\fR and \fIhardware\fR primitives only require a single \fIpoint\fR. \fIPoint\fR(\fIs\fR\|) are values within a Cartesian plane or \fIuniverse\fR having 64K (\-32K to +32K) points on each axis. .TP 10 \fBsw\fR \fISw\fR is the style-word and is used in \fIlines, arc,\fR and \fItext\fR primitives. The first 8 bits contain \fIcolor\fR information. In \fIarc\fR and \fIlines\fR the last 8 bits are divided as 4 bits \fIweight\fR and 4 bits \fIstyle\fR. In the \fItext\fR primitive the last 8 bits of \fIsw\fR contain the \fIfont\fR. .TP 10 \fBso\fR \fISo\fR is the size-orientation word used in \fItext\fR primitives. The first 8 bits contain text size (see \fItextsize\fR) and the remaining 8 bits contain tex.TH SSIGNAL 3C .SH NAME ssignal, gsignal \- software signals .SH SYNOPSIS .B #include .PP .BR "int (\(**ssignal (" "sig, action" "))( )" .br .BR int " sig" ", (\(**" "action" ")( );" .PP .BR "int gsignal (" sig ) .br .BR int " sig" ; .SH DESCRIPTION .I Ssignal\^ and .I gsignal\^ implement a software facility similar to .IR signal (2). This facility is used by the Standard C Library to enable users to indicate the disposition of error conditions; it is also made available to users for their own purposes. .PP Software signals made available to users are associated with integers in the inclusive range 1 through 15. A call to .I ssignal\^ associates a procedure, .IR action , with the software signal, .IR sig ; the software signal, .IR sig , is raised by a call to .IR gsignal . Raising a software signal causes the action established for that signal to be taken. .PP The first argument to .I ssignal\^ is a number identifying the type of signal for which an action is to be established. The second argument   lue from an enumeration data type .I "typedef enum { preorder, postorder, endorder, leaf }" .SM .I VISIT; As defined in the \fB\fP header file, the value of this data type depends on whether this is the first, second, or third time that the node has been visited (during a depth-first, left-to-right traversal of the tree), or whether the node is a leaf. The third argument is the level of the node in the tree; the root is level zero. .SH NOTES The pointers to the key and the root of the tree should be of type pointer-to-element and cast to type pointer-to-character. .br The comparison function need not compare every byte; therefore, arbitrary data may be contained in the elements in addition to the values being compared. .br Although declared as type pointer-to-character, the value returned should be cast into type pointer-to-element. on entry. .SH "SEE ALSO" bsearch(3C), hsearch(3C), lsearch(3C). .SH BUGS \fITsearch\fP fails if the calling function alters the pointer to the root. .SH WARNING The .I rt rotation (see \fItextangle\fR). .TP 10 \fBstring\fR \fIString\fR is a null-terminated character string. If the string does not end on a word boundary, an additional null is added to the \s-1GPS\s+1 file to assure word-boundary alignment. .SH "SEE ALSO" graphics(1G). .\" @(#)gps.4 1.3 defines the action; it is either the name of a user-defined .I action\^ function or one of the manifest constants .SM .B SIG_DFL (default) or .SM .B SIG_IGN (ignore). .I Ssignal\^ returns the action previously established for that signal type; if no \fIaction\fP has been established or the signal number (\fIsig\fP) is illegal, .I ssignal\^ returns .SM .BR SIG_DFL . .PP .I Gsignal\^ raises the signal identified by its argument, .IR sig : .RS 5 .PP If an \fIaction\fP function has been established for .IR sig , then that \fIaction\fP is reset to .SM .B SIG_DFL and the \fIaction\fP function is entered with argument .IR sig . .I Gsignal\^ returns the value returned to it by the \fIaction\fP function. .PP If the \fIaction\fP for .I sig\^ is .SM .BR SIG_IGN , .I gsignal\^ returns the value 1 and takes no other action. .PP If the \fIaction\fP for .I sig\^ is .SM .BR SIG_DFL , .I gsignal\^ returns the value 0 and takes no other action. .PP If .I sig\^ has an illegal value or no \fIaction\fP was ever specified for .IR oot\^ argument to .I twalk\^ is one level of indirection less than the .I rootp\^ arguments to .I tsearch\^ and .IR tdelete . .SH DIAGNOSTICS A .SM NULL pointer is returned by .I tsearch\^ if there is not enough space available to create a new node. .br A .SM NULL pointer is returned by .I tsearch\^ and .I tdelete\^ if .I rootp\^ is .SM NULL .\" @(#)tsearch.3c 1.6   .TH GROUP 4 .SH NAME group \- group file .SH DESCRIPTION .I Group\^ contains the following information for each group: .RS .TP \(bu group name .TP \(bu encrypted password .TP \(bu numerical group .SM ID .TP \(bu comma-separated list of all users allowed in the group .RE .PP This is an \s-1ASCII\s0 file. The fields are separated by colons; each group is separated from the next by a new-line character. If the password field is null, no password is demanded. .PP This file resides in directory .BR /etc . Because of the encrypted passwords, it can and does have general read permission and can be used, for example, to map numerical group \s-1ID\s0s to names. .SH FILES /etc/group .SH "SEE ALSO" newgrp(1), passwd(1), crypt(3C), passwd(4). .\" @(#)group.4 1.4 sig , .I gsignal\^ returns the value 0 and takes no other action. .RE .SH NOTES There are some additional signals with numbers outside the range 1 through 15 which are used by the Standard C Library to indicate error conditions. Thus, some signal numbers outside the range 1 through 15 are legal, although their use may interfere with the operation of the Standard C Library. .\" @(#)ssignal.3c 1.4 .TH TTYNAME 3C .SH NAME ttyname, isatty \- find name of a terminal .SH SYNOPSIS .BR "char \(**ttyname (" "fildes" ) .br .BR int " fildes" ; .PP .BR "int isatty (" fildes ) .br .BR int " fildes" ; .SH DESCRIPTION .I Ttyname\^ returns a pointer to a string containing the null-terminated pathname of the terminal device associated with file descriptor .IR fildes . .PP .I Isatty\^ returns 1 if .I fildes\^ is associated with a terminal device; otherwise, it returns 0. .SH FILES /dev/\(** .SH DIAGNOSTICS .I Ttyname\^ returns a .SM NULL pointer if .I fildes\^ does not describe a terminal device in directory .BR /dev . .SH BUGS The return value points to static data whose content is overwritten by each call. .\" @(#)ttyname.3c 1.4 .TH INITTAB 4 .SH NAME inittab \- script for the init process .SH DESCRIPTION The .B /etc/inittab file supplies the script for .IR init (1M) to perform as a general process dispatcher. The process that constitutes the majority of .IR init 's process dispatching activities is the line process .IR /etc/getty , which initiates individual terminal lines. Other processes typically dispatched by .I init are daemons and the shell. .PP NOTE: Within this section, the term \fIinit\fR always refers to the program described in \fIinit\fR(1M). .PP The \fIinittab\fP file is composed of entries that are position-dependent and have the following format: .PP .RS id:rstate:action:process .RE .PP Each entry is delimited by a new-line; however, a backslash (\^\e\^) preceding a new-line indicates a continuation of the entry. Up to 512 characters per entry are permitted. Comments may be inserted in the .I process field using the .IR sh (1) convention for comments. Comments for lines that spawn .IR getty s are displayed by th  .TH STDIO 3S .SH NAME stdio \- standard buffered input/output package .SH SYNOPSIS .B #include .PP .SM .B FILE .B \(**stdin, \(**stdout, \(**stderr; .SH DESCRIPTION The functions described in the entries of sub-class\ 3S of this manual constitute an efficient, user-level .SM I/O buffering scheme. The input/output function may be grouped into the following categories: file access, file status, input, output, miscellaneous. For lists of the functions in each category, refer to the ``Libraries'' section of the \fI\*(6) Programming Guide\fP. The in-line macros .IR getc (3S) and .IR putc (3S) handle characters quickly. The macros .IR getchar " and" .IR putchar , and the higher-level routines .IR fgetc , .IR fgets , .IR fprintf , .IR fputc , .IR fputs , .IR fread , .IR fscanf , .IR fwrite , .IR gets , .IR getw , .IR printf , .IR puts , .IR putw , and .I scanf\^ all use .I getc\^ and .IR putc ; they can be freely intermixed. .PP A file with associated buffering is called a .I stream\^ and is declared to .TH TTYSLOT 3C .SH NAME ttyslot \- find the slot in the utmp file of the current user .SH SYNOPSIS .B int ttyslot ( ) .SH DESCRIPTION .I Ttyslot\^ returns the index of the current user's entry in the .B /etc/utmp\^ file. This is accomplished by scanning the file .B /etc/inittab\^ for the name of the terminal device associated with the standard input, the standard output, or the error output (0, 1, or 2). .SH FILES /etc/inittab .br /etc/utmp .SH SEE ALSO getut(3C), ttyname(3C). .SH DIAGNOSTICS A value of 0 is returned if an error is encountered while searching for the terminal name or if none of the above file descriptors is associated with a terminal device. .\" @(#)ttyslot.3c 1.3 e .IR who (1) command. It is expected that they will contain some information about the line such as the location. There are no limits (other than maximum entry size) imposed on the number of entries within the .I inittab file. The entry fields are: .PP .TP \w'process\ \ \ 'u .I id This field is 1 to 4 characters used to uniquely identify an entry. .TP .I rstate This field defines the .IR run-level in which this entry is to be processed. \fIRun-levels\fP effectively correspond to a configuration of processes in the system. That is, each process spawned by .I init is assigned a \fIrun-level\fP or \fIrun-levels\fP in which it is allowed to exist. The .IR run-levels are represented by a number ranging from .B 0 through .BR 6 . As an example, if the system is in .IR run-level .BR 1 , only those entries having a .B 1 in the .IR rstate field will be processed. When .I init is requested to change .IR run-levels, all processes which do not have an entry in the .I rstate field for the target .IR run-level wibe a pointer to a defined type .SM .BR FILE\*S . .IR Fopen (3S) creates certain descriptive data for a stream and returns a pointer to designate the stream in all further transactions. Normally, there are three open streams with constant pointers declared in the \f3\f1 header file and associated with the standard open files: .RS .PP .PD 0 .TP 10 .B stdin standard input file .TP .B stdout standard output file .TP .B stderr standard error file. .RE .PD .PP A constant .SM .B NULL (0) designates a nonexistent pointer. .PP An integer constant .SM .B EOF (\-1) is returned upon end-of-file or error by most integer functions that deal with streams (see the individual descriptions for details). .PP Any program that uses this package must include the header file of pertinent macro definitions, as follows: .PP .RS .B "#include \|" .RE .PP The functions and constants mentioned in the entries of sub-class\ 3S of this manual are declared in that header file and need no further declaration. The constants   Etwalk.3cFtzset.3cGungetc.3sHutmpname.3cIxor.3fJy0.3mKy1.3mLyn.3mMzabs.3fNsys_errlist.3cll be sent the warning signal .RB ( \s-1SIGTERM\s+1 ) and allowed a 20-second grace period before being forcibly terminated by a kill signal .RB ( \s-1SIGKILL\s+1 ). The .I rstate field can define multiple .I run-levels for a process by selecting more than one \fIrun-level\fP in any combination from \fB0\-6\fP. If no .I run-level is specified, .I action will be taken on this .I process for all .IR run-levels , .BR 0\-6 . There are three other values, .BR a , .BR b , and .BR c , which can appear in the .I rstate field, even though they are not true .IR run-levels . Entries which have these characters in the .I rstate field are processed only when the .I telinit (see .IR init (1M)) process requests them to be run (regardless of the current .I run-level of the system). They differ from .I run-levels in that the system is only in these states for as long as it takes to execute all the entries associated with the states. A process started by an .BR a , .BR b , or .B c command is not killed when .I init chand the following functions are implemented as macros: .IR getc , .IR getchar , .IR putc , .IR putchar , .IR feof , .IR ferror , .IR clearerr , and .IR fileno . Redeclaration of these names is perilous. .PP The \f3\f1 file is illustrated in the ``Libraries'' section of the \f2\*(6) Programming Guide\f1. .SH SEE ALSO open(2), close(2), lseek(2), pipe(2), read(2), write(2), ctermid(3S), cuserid(3S), fclose(3S), ferror(3S), fopen(3S), fread(3S), fseek(3S), getc(3S), gets(3S), popen(3S), printf(3S), putc(3S), puts(3S), scanf(3S), setbuf(3S), system(3S), tmpfile(3S), tmpnam(3S), ungetc(3S). .SH DIAGNOSTICS Invalid .I stream\^ pointers cause serious errors, possibly including program termination. Individual function descriptions describe the possible error conditions. .\" @(#)stdio.3s 1.8 .\" @(#)twalk.3c 1.2 .so /usr/man/u_man/man3/tsearch.3c   anges levels. They are only killed if their line in .B /etc/inittab is marked \fBoff\fP in the .I action field, their line is deleted entirely from .BR /etc/inittab , or .I init goes into the .SM .I SINGLE USER state. .TP .I action Key words in this field tell .I init how to treat the process specified in the .I process field. The actions recognized by .I init are as follows: .PP .RS \w'process\ \ \ 'u .TP \w'\fBinitdefault\fP\ \ \ 'u .B respawn If the process does not exist, \fIinit\fR is to start the process, not wait for its termination (continue scanning the .I inittab file), and, when it dies, restart the process. If the process currently exists \fIinit\fR is to do nothing and continue scanning the .I inittab file. .TP .B wait When .I init\^ enters the \fIrun-level\fP that matches the entry's .IR rstate , it is to start the process and wait for its termination. All subsequent reads of the .I inittab file while .I init is in the same \fIrun-level\fP will cause .I init to ignore this entry. .TP .B o.TH STDIPC 3C .SH NAME stdipc \- standard interprocess communication package .SH SYNOPSIS .nf .B #include .B #include .PP .BR "key_t ftok(" "path, id" ) .BR "char \(**" path ; .BR char " id" ; .fi .SH DESCRIPTION All interprocess communication facilities require the user to supply a key to be used by the .IR msgget (2), .IR semget (2), and .IR shmget (2) system calls to obtain interprocess communication identifiers. One method for forming a key is to use the .I ftok subroutine described below. Another way to compose keys is to include the project \s-1ID\s+1 in the most significant byte and to use the remaining portion as a sequence number. There are many other ways to form keys, but it is necessary for each system to define standards for forming them. If a standard is not adhered to, unrelated processes may interfere with each other's operation. Therefore, it is strongly suggested that the most significant byte of a key in some sense refer to a project so that keys do not conflict ac.\" @(#)tzset.3c 1.2 .so /usr/man/u_man/man3/ctime.3c nce When .I init\^ enters a \fIrun-level\fP that matches the entry's .IR rstate , it is to start the process, not wait for its termination and, when it dies, not restart the process. If a new \fIrun-level\fP is entered when the process is still running, the program will not be restarted. .TP .B boot The entry is to be processed only at .IR init 's boot-time read of the .I inittab file. .I Init is to start the process, not wait for its termination, and, when it dies, not restart the process. In order for this instruction to be meaningful, either the .I rstate should be the default or it must match .IR init 's \fIrun-level\fP at boot time. This action is useful for an initialization function following a hardware reboot of the system. .TP .B bootwait The entry is to be processed only at .IR init 's boot-time read of the .I inittab file. .I Init is to start the process, wait for its termination, and, when it dies, not restart the process. .TP .B powerfail \fIInit\fR is to execute the process associated wit ross a given system. .PP .I Ftok returns a key based on .I path and .I id that is usable in subsequent .IR msgget , .IR semget , and .I shmget system calls. .I Path must be the pathname of an existing file that is accessible to the process. .I Id is a character that uniquely identifies a project. .I Ftok returns the same key for linked files when called with the same .IR id ; it returns different keys when called with the same filename but different .IR id s. .SH "SEE ALSO" intro(2), msgget(2), semget(2), shmget(2). .SH DIAGNOSTICS .I Ftok returns .B "(key_t) \-1" if \fIpath\fP does not exist or if it is not accessible to the process. .SH WARNING If the file whose \fIpath\fP is passed to .I ftok is removed when keys still refer to the file, future calls to .I ftok with the same \fIpath\fP and \fIid\fP will return an error. If the same file is recreated, .I ftok is likely to return a different key than it did the original time it was called. .\" @(#)stdipc.3c 1.4 .TH UNGETC 3S .SH NAME ungetc \- push character back into input stream .SH SYNOPSIS .B #include .PP .BR "int ungetc (" "c, stream" ) .br .BR char " c" ; .br .BR "\s-1FILE\s+1 \(**" stream ; .SH DESCRIPTION .I Ungetc\^ inserts the character .I c\^ into the buffer associated with an input .IR stream . That character, .IR c , will be returned by the next .I getc\^ call on that .IR stream . .I Ungetc\^ returns .I c and leaves the file .I stream\^ unchanged. .PP One character of pushback is guaranteed provided something has been read from the stream and the stream is actually buffered. .PP If .I c\^ equals .SM .BR EOF , .I ungetc\^ does nothing to the buffer and returns .SM .BR EOF . .PP .IR Fseek (3S) erases all memory of inserted characters. .SH "SEE ALSO" fseek(3S), getc(3S), setbuf(3S). .SH DIAGNOSTICS For .I ungetc\^ to perform correctly, a read statement must have been performed prior to the call of the .I ungetc\^ function. .I Ungetc\^ returns .SM .B EOF if it can't insert the character. If .I sh this entry only when it receives a powerfail signal .RB ( \s-1SIGPWR\s+1; see .IR signal (2)). .TP .B powerwait \fIInit\fR is to execute the process associated with this entry only when it receives a powerfail signal .RB ( \s-1SIGPWR\s+1 ) and is to wait until the process terminates before continuing any processing of .IR inittab . .TP .B off If the process associated with this entry is currently running, \fIinit\fR is to send the warning signal .RB ( \s-1SIGTERM\s+1 ) and wait 20 seconds before forcibly terminating the process via the kill signal .RB ( \s-1SIGKILL\s+1 ). If the process is nonexistent, \fIinit\fR is to ignore the entry. .TP .B ondemand This instruction is really a synonym for the .B respawn action. It is functionally identical to .B respawn but is given a different keyword in order to divorce its association with \fIrun-levels\fP. This is used only with the .BR a , .BR b , or .B c values described in the .I rstate field. .TP .B initdefault An entry with this .I action is scanned only whe.\" @(#)strcat.3c 1.2 .so /usr/man/u_man/man3/string.3c  tream\^ is .IR stdin , .I ungetc\^ allows exactly one character to be pushed back onto the buffer without a previous read statement. .\" @(#)ungetc.3s 1.4 n .I init is initially invoked. .I Init uses this entry, if it exists, to determine which .I run-level to enter initially. It does this by taking the highest \fIrun-level\fP specified in the .B rstate field and using that as its initial state. If the .I rstate field is empty, this is interpreted as .B 0123456 and .I init will enter .I run-level .BR 6 . If the .B initdefault entry is .BR s , .I init will start in the .SM .I SINGLE USER state. If .I init doesn't find an .B initdefault entry in .BR /etc/inittab , it will request an initial .I run-level from the user at reboot time. .TP .B sysinit Entries of this type are executed before .I init tries to access the console. It is expected that this entry will be only used to initialize devices on which .I init might try to ask the \fIrun-level\fP question. These entries are executed and waited for before continuing. .RE .TP \w'process\ \ \ 'u .I process This is a .I sh command to be executed. The entire .B process field is prefixed with .I exec and passed to .\" @(#)strchr.3c 1.2 .so /usr/man/u_man/man3/string.3c .\" @(#)utmpname.3c 1.2 .so /usr/man/u_man/man3/getut.3c  a forked .I sh as .BI "sh \-c \(fmexec" " command" \(fm\fR.\fP For this reason, any legal .I sh syntax can appear in the the .I process field. Comments can be inserted with the .BI "; #" comment syntax. .SH FILES /etc/inittab .SH "SEE ALSO" getty(1M), init(1M), sh(1), who(1), exec(2), open(2), signal(2). .\" @(#)inittab.4 1.4 .\" @(#)strcmp.3c 1.2 .so /usr/man/u_man/man3/string.3c .\" @(#)xor.3f 1.2 .so /usr/man/u_man/man3/bool.3f '\" t .TH INODE 4 .SH NAME inode \- format of an inode .SH SYNOPSIS .B #include .br .B #include .SH DESCRIPTION An inode for a plain file or directory in a file system has the following structure defined by .BR . .PP .nf .RS /\(** Inode structure as it appears on a disk block. \(**/ .TS l1 l1 l1 l. \f3struct dinode\f1 \f3{\f1 \f3ushort di_mode;\f1 /\(** mode and type of file \(**/ \f3short di_nlink;\f1 /\(** number of links to file \(**/ \f3ushort di_uid;\f1 /\(** owner's user id \(**/ \f3ushort di_gid;\f1 /\(** owner's group id \(**/ \f3off_t di_size;\f1 /\(** number of bytes in file \(**/ \f3char di_addr[40];\f1 /\(** disk block addresses \(**/ \f3time_t di_atime;\f1 /\(** time last accessed \(**/ \f3time_t di_mtime;\f1 /\(** time last modified \(**/ \f3time_t di_ctime;\f1 /\(** time created \(**/ \f3};\f1 .TE /\(** \(** the 40 address bytes: \(** 39 used; 13 addresses \(** of 3 bytes each. \(**/ .RE .fi For the meaning of the defined types .I off_ .\" @(#)strcpy.3c 1.2 .so /usr/man/u_man/man3/string.3c .\" @(#)y0.3m 1.2 .so /usr/man/u_man/man3/bessel.3m t\^ and .IR time_t , see .IR types (5). .SH FILES /usr/include/sys/ino.h .SH SEE ALSO stat(2), fs(4), types(5). .\" @(#)inode.4 1.6 .\" @(#)strcspn.3c 1.2 .so /usr/man/u_man/man3/string.3c  .\" @(#)y1.3m 1.2 .so /usr/man/u_man/man3/bessel.3m .TH INTRO 4 .SH NAME intro \- introduction to file formats .SH DESCRIPTION This section outlines the header files and file formats used by \*(5). C .B struct declarations for the file formats are given where applicable. Usually, these structures can be found in the directories .B /usr/include or .BR /usr/include/sys . .\" @(#)intro.4 1.3 .TH STRING 3C .SH NAME strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn, strtok \- string operations .SH SYNOPSIS .nf .B #include .PP .BR "char \(**strcat (" "s1, s2" ) .BR "char \(**" "s1" ", \(**" "s2" ; .PP .BR "char \(**strncat (" "s1, s2, n" ) .BR "char \(**" "s1" ", \(**" "s2" ; .BR int " n" ; .PP .BR "int strcmp (" "s1, s2" ) .BR "char \(**" "s1" ", \(**" s2 ; .PP .BR "int strncmp (" "s1, s2, n" ) .BR "char \(**" "s1" ", \(**" s2 ; .BR int " n" ; .PP .BR "char \(**strcpy (" "s1, s2" ) .BR "char \(**" "s1" ", \(**" s2 ; .PP .BR "char \(**strncpy (" "s1, s2, n" ) .BR "char \(**" "s1" ", \(**" s2 ; .BR int " n" ; .PP .BR "int strlen (" s ) .BR "char \(**" s ; .PP .BR "char \(**strchr (" "s, c" ) .BR "char \(**" "s, c" ; .PP .BR "char \(**strrchr (" "s, c" ) .BR "char \(**" "s, c" ; .PP .BR "char \(**strpbrk (" "s1, s2" ) .BR "char \(**" "s1" ", \(**" s2 ; .PP .BR "int strspn (" "s1, s2" ) .BR "char \(**" "s1" ", \(**" s2 ; .PP .BR "int strcsp.\" @(#)yn.3m 1.2 .so /usr/man/u_man/man3/bessel.3m  .TH ISSUE 4 .SH NAME issue \- issue identification file .SH DESCRIPTION The file .B /etc/issue contains the .I issue or project identification to be printed as a login prompt. This is an \s-1ASCII\s+1 file which is read by .IR getty (1M) and then written to any terminal spawned or respawned from the .I lines file. .SH FILES /etc/issue .SH "SEE ALSO" getty(1M), login(1). .\" @(#)issue.4 1.3 n (" "s1, s2" ) .BR "char \(**" "s1" ", \(**" s2 ; .PP .BR "char \(**strtok (" "s1, s2" ) .BR "char \(**" "s1" ", \(**" s2 ; .SH DESCRIPTION The arguments .IR s1 , " s2" , and .I s\^ point to strings (arrays of characters terminated by a null character). The functions .IR strcat , .IR strncat , .IR strcpy , and .I strncpy\^ all alter .IR s1 . These functions do not check for overflow of the array pointed to by .IR s1 . .PP .I Strcat\^ appends a copy of string .I s2\^ to the end of string .IR s1 . .I Strncat\^ appends at most .I n\^ characters. Each function returns a pointer to the null-terminated result. .PP .I Strcmp\^ performs a lexicographical comparison of its arguments and returns an integer less than, equal to, or greater than 0, when .I s1\^ is less than, equal to, or greater than .IR s2 ", respectively." .I Strncmp\^ makes the same comparison but looks at a maximum of .I n\^ characters. .PP .I Strcpy\^ copies string .I s2\^ to string .IR s1 , stopping after the null character has been copied. .I Strn.\" @(#)zabs.3f 1.2 .so /usr/man/u_man/man3/abs.3f .TH LDFCN 4 .SH NAME ldfcn \- common object file access routines .SH SYNOPSIS .nf .ft B .B #include .ie '\*p'' \{\ .B #include .B #include .fi \} .el \{\ .B #include "\s-1INCDIR\s+1\/filehdr.h" .B #include "\s-1INCDIR\s+1\/ldfcn.h" \} .ft R .SH DESCRIPTION The common object file access routines are a collection of functions for reading an object file that is in common object file form. Although the calling program must know the detailed structure of the parts of the object file that it processes, the routines effectively insulate the calling program from knowledge of the overall structure of the object file. The interface between the calling program and the object file access routines is based on the defined type .B \s-1LDFILE\s+1 (defined as .BR "struct ldfile" ), which is declared in the header file .BR . The primary purpose of this structure is to provide uniform access to both simple object files and object files that are members of an archive file. .PP The funct cpy\^ copies exactly .I n\^ characters, truncating .I s2\^ or adding null characters to .I s1\^ if necessary. The result is not null-terminated if the length of .I s2\^ is .I n\^ or more. Each function returns .IR s1 . .PP .I Strlen\^ returns the number of characters in .IR s , not including the terminating null character. .PP .I Strchr\^ .RI ( strrchr ) returns a pointer to the first (last) occurrence of character .I c\^ in string .IR s , or a .SM NULL pointer if .I c\^ does not occur in the string. The null character terminating a string is considered to be part of the string. .PP .I Strpbrk\^ returns a pointer to the first occurrence in string .I s1\^ of any character from string .IR s2 , or a .SM NULL pointer if no character from .I s2\^ exists in .IR s1 . .PP .I Strspn\^ .RI ( strcspn ) returns the length of the initial segment of string .I s1\^ which consists entirely of characters from (not from) string .IR s2 . .PP .I Strtok\^ considers the string .I s1\^ to consist of a sequence of zero or more tex.\" @(#)sys_errlist. 1.3 (sys_errlist.3c) .so /usr/man/u_man/man3/perror.3c ion .IR ldopen (3X) allocates and initializes the .B \s-1LDFILE\s+1 structure and returns a pointer to the structure to the calling program. The fields of the .B \s-1LDFILE\s+1 structure may be accessed individually through macros defined in .B and contain the following information: .TP 15 \s-1LDFILE\s+1 \(**ldptr; .TP 15 \s-1TYPE\s+1(ldptr) The file magic number, used to distinguish between archive members and simple object files. .TP 15 \s-1IOPTR\s+1(ldptr) The file pointer returned by \fIfopen\fP(3S) and used by the standard input/output functions. .TP 15 \s-1OFFSET\s+1(ldptr) The file address of the beginning of the object file; the offset is non-zero if the object file is a member of an archive file. .TP 15 \s-1HEADER\s+1(ldptr) The file header structure of the object file. .PP The object file access functions may be divided into four categories: .RS .PP (1) functions that open or close an object file .PP .RS .IR ldopen (3X) and .I ldaopen .RS open a common object file .RE .IR ldclose (3X) ant tokens separated by spans of one or more characters from the separator string .IR s2 . The first call (with pointer .I s1\^ specified) returns a pointer to the first character of the first token, and writes a null character into .I s1\^ immediately following the returned token. The function keeps track of its position in the string between separate calls, so that on subsequent calls (which must be made with a .SM NULL pointer as the first argument) it works through the string .I s1\^ immediately following that token. This can be continued until no tokens remain. The separator string .I s2\^ may be different from call to call. When no token remains in .IR s1 , a .SM NULL pointer is returned. .SH NOTE For user convenience, all these functions are declared in the optional .B header file. .SH BUGS .I Strcmp\^ and .I strncmp\^ use native character comparison, which is signed on .SM PDP\*S-11s, unsigned on other machines. .PP Character movement is performed differently in different implementations; th O...Pa.out.4Qacct.4Raouthdr.4Sar.4Tchecklist.4Ucore.4Vcpio.4Wdir.4Xerrfile.4Yfilehdr.4Zfs.4[fspec.4\gettydefs.4]gps.4^group.4_inittab.4`inode.4aintro.4bissue.4cldfcn.4dlinenum.4emaster.dec.4fmnttab.4gpasswd.4hplot.4ipnch.4jprofile.4kreloc.4lsccsfile.4mscnhdr.4nsyms.4osystem.4putmp.4qwtmp.4d .I ldaclose .RS close a common object file .RE .RE .PP (2) functions that read header or symbol table information .PP .RS .IR ldahread (3X) .RS read the archive header of a member of an archive file .RE .IR ldfhread (3X) .RS read the file header of a common object file .RE .IR ldshread (3X) and .I ldnshread .RS read a section header of a common object file .RE .IR ldtbread (3X) .RS read a symbol table entry of a common object file .RE .IR ldgetname (3X) .RS retrieve a symbol name from a symbol table entry or from the string table .RE .RE .PP (3) functions that position an object file at (seek to) the start of the section, relocation, or line number information for a particular section. .PP .RS .IR ldohseek (3X) .RS seek to the optional file header of a common object file .RE .IR ldsseek (3X) and .I ldnsseek .RS seek to a section of a common object file .RE .IR ldrseek (3X) and .I ldnrseek .RS seek to the relocation information for a section of a common object file .RE .IR ldlseek (3X) and .I ldnlseek .RSerefore, overlapping moves may yield unexpected results. .\" @(#)string.3c 1.6 .\" @(#)a.out.4 1.6 .TH A.OUT 4 .SH NAME \*pa.out \- common assembler and link editor output .SH DESCRIPTION .B \*pA.out is the output file from the assembler .IR \*pas "(1) and " the link editor .IR \*pld (1). .IR A.out can be executed on the target machine if there were no errors in assembling or linking and no unresolved external references. .PP The object file format supports user-defined sections and contains extensive information for symbolic software testing. A common object file consists of a file header, an optional aout header, a table of section headers, relocation information, (optional) line numbers, and a symbol table. The order is given below. .sp 1v .nf .RS 10 File header. Optional aout header. Section 1 header. \&... Section n header. Section 1 data. \&... Section n data. Section 1 relocation. \&... Section n relocation. Section 1 line numbers. \&... Section n line numbers. Symbol table. String table. .sp 1v .fi .RE .ta .if t .RE The last four sections (relocation, line numbers, symbol table  seek to the line number information for a section of a common object file .RE .IR ldtbseek (3X) .RS seek to the symbol table of a common object file .RE .RE .PP (4) the function .IR ldtbindex (3X) which returns the index of a particular common object file symbol table entry .RE .PP These functions are described in detail in the manual pages identified for each function. All the functions except .IR ldopen , .IR ldaopen , and .I ldtbindex return either .BR \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 , which are constants defined in .BR . .I Ldopen and .I ldaopen both return pointers to a .BR \s-1LDFILE\s+1 " structure." .SH MACROS Additional access to an object file is provided through a set of macros defined in .BR . These macros parallel the standard input\/output file reading and manipulating functions, translating a reference of the .B \s-1LDFILE\s+1 structure into a reference to its file descriptor field. .PP The following macros are provided: .PP .RS .nf GETC(ldptr) FGETC(ldptr) GETW.\" @(#)strlen.3c 1.2 .so /usr/man/u_man/man3/string.3c , and string table) may be missing if the program was linked with the .B \-s option of .IR ld (1) or if the symbol table and relocation bits were removed by .IR strip (1). Also note that if the program was linked without the .B \-r option, the relocation information will be absent. The string table exists only if necessary. .PP When an .B a.out file is loaded into memory for execution, three logical segments are set up: the text segment, the data segment (initialized data followed by uninitialized data, the latter actually being initialized to all 0's), and a stack. The text segment begins at location 0 in the core image; the header is not loaded. If the magic number (the first field in the optional aout header) is 407 (octal), it indicates that the text segment is not to be write-protected or shared, so the data segment will be contiguous with the text segment. If the magic number is 410 (octal), the data segment begins at the next segment boundary following the text segment, and the text segment is not writ(ldptr) UNGETC(c, ldptr) FGETS(s, n, ldptr) FREAD((char \(**) ptr, sizeof (\(**ptr), nitems, ldptr) FSEEK(ldptr, offset, ptrname) FTELL(ldptr) REWIND(ldptr) FEOF(ldptr) FERROR(ldptr) FILENO(ldptr) SETBUF(ldptr, buf) STROFFSET(ldptr) .RE .fi .PP The STROFFSET macro calculates the address of the string table in a \*(5) object file. See the manual entries for the corresponding standard input/output library functions for details on the use of these macros. (The functions are identified as 3S in Section 3 of this manual.) .PP The program must be loaded with the object file access routine library .ie '\*p'' \{\ .BR libld.a . \} .el \{\ .BR \s-1LIBDIR\s+1\/libld.a . \} .PP .PP .if !'\*p'' \{\ .IR Intro (4) describes .IR \s-1LIBDIR\s+1 " and " \s-1INCDIR\s+1 . \} .SH WARNINGS The macro .SM \fBFSEEK\fR defined in the header file .B translates into a call to the standard input/output function .IR fseek (3S). .SM \fBFSEEK\fR should not be used to seek from the end of an archive file since the end of an archi .\" @(#)strncat.3c 1.2 .so /usr/man/u_man/man3/string.3c able by the program. If other processes are executing the same .B a.out file, they will share a single text segment. .PP On the 3B20S, the stack begins at the end of the text and data sections and grows towards higher addresses. On the M68000 family of processors and the VAX, the stack begins at the end of memory and grows toward lower addresses. The stack is automatically extended as required. The data segment is extended only as requested by the .IR brk (2) .RI and " sbrk" (2) system calls. .PP The value of a word in the text or data portions that is not a reference to an undefined external symbol is exactly the value that will appear in memory when the file is executed. If a word in the text involves a reference to an undefined external symbol, the storage class of the symbol-table entry for that word will be marked as an ``external symbol'', and the section number will be set to 0. When the file is processed by the link editor and the external symbol becomes defined, the value of the symbol will be addeve file may not be the same as the end of one of its object file members. .SH "SEE ALSO" .ie '\*p'' \{\ fopen(3S), fseek(3S), ldahread(3X), ldclose(3X), ldfhread(3X), ldgetname(3X), ldlread(3X), ldlseek(3X), ldohseek(3X), ldopen(3X), ldrseek(3X), ldlseek(3X), ldshread(3X), ldtbindex(3X), ldtbread(3X), ldtbseek(3X). \} .el \{\ fopen(3S), fseek(3S), ldahread(3X), ldclose(3X), ldfhread(3X), ldgetname(3X), ldlread(3X), ldlseek(3X), ldohseek(3X), ldopen(3X), ldrseek(3X), ldlseek(3X), ldshread(3X), ldtbindex(3X), ldtbread(3X), ldtbseek(3X), intro(5). paths.h(4). \} .br .I "Common Object File Format," by I. S. Law. .\" @(#)ldfcn.4 1.5 .\" @(#)strncmp.3c 1.2 .so /usr/man/u_man/man3/string.3c  d to the word in the file. .PP See .IR aouthdr (4), .IR filehdr (4), .IR linenum (4), .IR scnhdr (4), .IR reloc "(4), and" .IR syms (4) for descriptions of the individuals parts. Every section created by \fIas\fP(1) contains a multiple-of-four number of bytes; directives to \fIld\fP(1) can create a section with an odd number of bytes. .SH SEE ALSO as(1), cc(1), ld(1), aouthdr(4), filehdr(4), ldfcn(4), linenum(4), reloc(4), scnhdr(4), syms(4). '\" \%W\% .TH LINENUM 4 .SH NAME linenum \- line number entries in a common object file .SH SYNOPSIS .B #include .SH DESCRIPTION The C compiler generates an entry in the object file for each C source line on which a breakpoint is possible (when invoked with the \fB\-g\fR option; see .IR cc (1)). Users can then reference line numbers when using the appropriate software test system (see .IR sdb (1)). The structure of these line number entries appears below. .PP .if t .RS .ta \w'struct\ \ 'u +\w'unsigne'u +\w'd\ short\|\|\|\ \ 'u .nf .lg 0 \f3struct lineno\f1 \f3{\f1 \f3union\f1 \f3{\f1 \f3long l_symndx ;\f1 \f3long l_paddr ;\f1 \f3} l_addr ;\f1 \f3unsigned short l_lnno ;\f1 \f3} ;\f1 .fi .lg .if t .RE .PP Numbering starts with one for each function. The initial line number entry for a function has .I l_lnno equal to zero, and the symbol table index of the function's entry is in .IR l_symndx . Otherwise, .I l_lnno is non-zero, and .I l_paddr is the physical address of the code for the referenced lin.\" @(#)strncpy.3c 1.2 .so /usr/man/u_man/man3/string.3c '\" t .TH ACCT 4 .SH NAME acct \- per-process accounting file format .SH SYNOPSIS .B #include .SH DESCRIPTION Files produced as a result of calling .IR acct (2) have records in the form defined by .BR , whose contents are: .PP .nf .in \f3typedef ushort comp_t;\f1 /\(** "floating point" \(**/ /\(** 13-bit fraction, 3-bit exponent \(**/ .TS l1 l1 l1 l. \f3struct acct\f1 \f3{\f1 \f3char ac_flag;\f1 /\(** Accounting flag \(**/ \f3char ac_stat;\f1 /\(** Exit status \(**/ \f3ushort ac_uid;\f1 /\(** Accounting user ID \(**/ \f3ushort ac_gid;\f1 /\(** Accounting group ID \(**/ \f3dev_t ac_tty;\f1 /\(** control typewriter \(**/ \f3time_t ac_btime;\f1 /\(** Beginning time \(**/ \f3comp_t ac_utime;\f1 /\(** acctng user time in clock ticks \(**/ \f3comp_t ac_stime;\f1 /\(** acctng system time in clock ticks \(**/ \f3comp_t ac_etime;\f1 /\(** acctng elapsed time in clock ticks \(**/ \f3comp_t ac_mem;\f1 /\(** memory usage in clicks \(**/ \f3comp_t ac_io;\f1 /\(** cha e. Thus the overall structure is the following: .sp .RS 10 .ta \w'function\ symtab\ index\ \ \ \ 'u .nf .I l_addr l_lnno .sp function symtab index 0 physical address line physical address line \&... function symtab index 0 physical address line physical address line \&... .fi .sp .RE .DT .SH "SEE ALSO" cc(1), sdb(1), a.out(4). '\" \%W\% .\" @(#)linenum.4 1.5 .\" @(#)strpbrk.3c 1.2 .so /usr/man/u_man/man3/string.3c rs trnsfrd by read/write \(**/ \f3comp_t ac_rw;\f1 /\(** number of block reads/writes \(**/ \f3char ac_comm[8];\f1 /\(** command name \(**/ \f3};\f1 \f3extern struct acct acctbuf;\f1 \f3extern struct inode \(**acctp;\f1 /\(** inode of accounting file \(**/ \f3#define AFORK 01\f1 /\(** has executed fork, but no exec \(**/ \f3#define ASU 02\f1 /\(** used superuser privileges \(**/ \f3#define ACCTF 0300\f1 /\(** record type: 00 = acct \(**/ .TE .fi .PP In .IR ac_flag , the .SM AFORK flag is turned on by each .IR fork (2) and turned off by an .IR exec (2). The .I ac_comm\^ field is inherited from the parent process and is reset by any .IR exec . Each time the system charges the process with a clock tick, it also adds to .I ac_mem\^ the current process size, computed as follows: .IP (data size) + (text size) / (number of in-core processes using text) .PP The value of .I ac_mem\|/\|(ac_stime\|+\|ac_utime) can be viewed as an approximation of the mean process size, as modified by text-sharing. .PP .ne 20 .TH MASTER 4 .SH NAME master \- master device information table .SH DESCRIPTION This file is used by the .IR config (1M) program to obtain device information that enables it to generate the configuration files. The file consists of 3 or 4 parts, each separated by a line with a dollar sign .RB ( $ ) in column 1. Part 1 contains device information; part 2 contains names of devices that have aliases; part 3 contains tunable parameter information. Part 4 is optional and contains information related to configuring the \s-1M68000\s+1 family systems only. Any line with an asterisk .RB ( \(** ) in column 1 is treated as a comment. .PP Part 1 contains lines consisting of at least 10 fields and at most 13 fields. The fields are delimited by tabs and/or blanks. .PP .TS l l. Field 1: device name (8 chars. maximum). .sp Field 2: interrupt vector size (decimal, in bytes). .sp Field 3: T{ .nf device mask (octal)\-each ``on'' bit indicates that the handler exists: \^\^\^000100 initialization handler \^\^\^000040 power-f .\" @(#)strrchr.3c 1.2 .so /usr/man/u_man/man3/string.3c The structure .BR tacct.h , which resides with the source files of the accounting commands, represents the total accounting format used by the various accounting commands: .PP .nf .in .br .ne 16v /\(** \(** total accounting (for acct period), also for day \(**/ .TS l1 l1 l1 l. \f3struct tacct {\f1 \f3uid_t ta_uid;\f1 /\(** userid \(**/ \f3char ta_name[8];\f1 /\(** login name \(**/ \f3float ta_cpu[2];\f1 /\(** cum. cpu time, p/np (mins) \(**/ \f3float ta_kcore[2];\f1 /\(** cum kcore-minutes, p/np \(**/ \f3float ta_con[2];\f1 /\(** cum. connect time, p/np, mins \(**/ \f3float ta_du;\f1 /\(** cum. disk usage \(**/ \f3long ta_pc;\f1 /\(** count of processes \(**/ \f3unsigned short ta_sc;\f1 /\(** count of login sessions \(**/ \f3unsigned short ta_dc;\f1 /\(** count of disk samples \(**/ \f3unsigned short ta_fee;\f1 /\(** fee for special services \(**/ \f3};\f1 .TE .fi .SH SEE ALSO acct(1M), acctcom(1), acct(2). .SH BUGS The .I ac_mem\^ value for a short-lived command gives little informatioailure handler \^\^\^000020 open handler \^\^\^000010 close handler \^\^\^000004 read handler \^\^\^000002 write handler \^\^\^000001 ioctl handler .fi T} .sp Field 4: T{ .nf device type indicator (octal): \^\^\^000200 allow only one of these devices \^\^\^000100 suppress count field in the \f3conf.c\f1 file \^\^\^000040 suppress interrupt vector \^\^\^000020 required device \^\^\^000010 block device \^\^\^000004 character device \^\^\^000002 interrupt driven device other than block or char. device .fi T} .sp Field 5: handler prefix (4 chars. maximum). .sp Field 6: device address size (decimal). .sp Field 7: major device number for block-type device. .sp Field 8: T{ .nf major device number for character-type device. .fi T} .sp Field 9: T{ .nf maximum number of devices per controller (decimal). .fi T} .sp Field 10: maximum bus request level (1 through 7). .sp Fields 11-13: T{ .nf optional configuration table structure declarations (8 chars. maximum) .fi T} .TE .PP Part 2 contains lines with.\" @(#)strspn.3c 1.2 .so /usr/man/u_man/man3/string.3c  n about the actual size of the command, because .I ac_mem\^ may be incremented while a different command (e.g., the shell) is being executed by the process. .DT .\" @(#)acct.4 1.5  2 fields each: .PP .TS l l. Field 1: alias name of device (8 chars. maximum). .sp Field 2: T{ .nf reference name of device (8 chars. maximum; specified in part 1). .fi T} .TE .PP Part 3 contains lines with 2 or 3 fields each: .PP .TS l l. Field 1: T{ .nf parameter name (as it appears in description file; 30 chars. maximum) .fi T} .sp Field 2: T{ .nf parameter name (as it appears in the \f3conf.c\f1 file; 30 chars. maximum) .fi T} .sp Field 3: T{ .nf default parameter value (30 chars. maximum; parameter specification is required if this field is omitted) .fi T} .TE .PP Part 4 contains M68000-specific lines exactly like those for the M68000-specific portion of the \fBdfile\fP. See \fIconfig\fP (1M) for a description of these lines. .PP Devices that are not interrupt-driven have an interrupt vector size of zero. The 040 bit in Field 4 causes .IR config (1M) to record the interrupt vectors although the .B m68kvec.s file will show no interrupt vector assignment at those locations (interrupts here will be t.\" @(#)strtok.3c 1.2 .so /usr/man/u_man/man3/string.3c .TH AOUTHDR 4 .SH NAME aouthdr \- optional aout header .SH SYNOPSIS .B "#include " .SH DESCRIPTION An object file may contain an optional header, following the file header described in \fIfilehdr\fP(4). Object files that have been completely linked by \fIld\fP(1) contain this header; others do not. The format of the optional header is: .sp .nf .ta .75i 1.5i 2.75i \f3typedef struct aouthdr {\f1 \f3short magic;\f1 /* magic number */ \f3short vstamp;\f1 /* version stamp */ \f3long tsize;\f1 /* text size in bytes, padded (\fI.text\fP) */ \f3long dsize;\f1 /* initialized data (\fI.data\fP) */ \f3long bsize;\f1 /* uninitialized data (\fI.bss\fP) */ \f3long entry;\f1 /* entry point */ \f3long text_start;\f1 /* base of text used for this file */ \f3long data_start;\f1 /* base of data used for this file */ \f3} AOUTHDR;\f1 .fi .ta .SH "SEE ALSO" a.out(4), filehdr(4). .\" @(#)aouthdr.4 1.5  reated as strays). .SH SEE ALSO config(1M). .\" @(#)master.dec.4 1.6 .TH STRTOL 3C .SH NAME strtol, atol, atoi \- convert string to integer .SH SYNOPSIS .nf .BR "long strtol (" "str, ptr, base" ) .BR "char \(**" str ; .BR "char \(**\(**" ptr ; .BR int " base" ; .PP .BR "long atol (" str ) .BR "char \(**" str ; .PP .BR "int atoi (" str ) .BR "char \(**" str ; .fi .SH DESCRIPTION .I Strtol\^ returns as a long integer the value represented by the character string .IR str . The string is scanned up to the first character inconsistent with the base. Leading white-space characters (blanks and tabs) are ignored. .PP If the value of .I ptr\^ is not (char \(**\(**)\s-1NULL\s+1, a pointer to the character terminating the scan is returned in .IR \(**ptr . If no integer can be formed, zero is returned. .PP If .I base\^ is positive (and not greater than 36), it is used as the base for conversion. After an optional leading sign, leading zeros are ignored; a leading \fB0x\fP or \fB0X\fP is ignored if .I base\^ is 16. .PP If .I base\^ is zero, the string itself determines the base. After an.TH AR 4 .SH NAME ar \- common archive file format .SH DESCRIPTION The archive command .I ar\^ is used to combine several files into one. Archives are used mainly as libraries to be searched by the link editor .IR ld (1). .PP Each archive begins with the archive magic string. .PP .nf \f3#define ARMAG "!\en"\f1 /\(** magic string \(**/ \f3#define SARMAG 8\f1 /\(** length of magic string \(**/ .fi .PP Each archive which contains common object files (see \f2a.out\f1(4)) includes an archive symbol table. This symbol table is used by the link editor \f2ld\f1(1) to determine which archive members must be loaded during the link edit process. The archive symbol table (if it exists) is always the first file in the archive (but is never listed) and is automatically created and/or updated by \f2ar\f1. .PP Following the archive magic string are the archive file members. Each file member is preceded by a file member header which is of the following format: .PP .nf \f3#define ARFMAG "\(ga\en"\f1 /\'\" t .TH MNTTAB 4 .SH NAME mnttab \- mounted file system table .SH SYNOPSIS .B #include .SH DESCRIPTION .I Mnttab\^ resides in directory .B /etc and contains a table of devices, mounted by the .IR mount (1M) command, in the following structure as defined by .BR : .PP .RS .nf .TS l l l. \f3struct mnttab {\f1 \f3char mt_dev[10];\f1 \f3char mt_filsys[10];\f1 \f3short mt_ro_flg;\f1 \f3time_t mt_time;\f1 \f3};\f1 .TE .RE .fi .RE .PP Each entry is 26 bytes in length; the first 10 bytes are the null-padded name of the place where the .I "special file\^" is mounted; the next 10 bytes represent the null-padded root name of the mounted special file; the remaining 6 bytes contain the mounted .IR "special file" 's read/write permissions and the date on which it was mounted. .PP The maximum number of entries in .I mnttab\^ is based on the system parameter .SM .B NMOUNT located in .BR /usr/src/uts/cf/conf.c , which defines the number of allowable mounted special files. .SH SEE ALSO mount(1M), set  optional leading sign, a leading zero indicates octal conversion and a leading \fB0x\fP or \fB0X\fP indicates hexadecimal conversion; otherwise, decimal conversion is used. .PP Truncation from long to int can take place upon assignment or by an explicit cast. .PP .BI Atol( str ) is equivalent to .BI "strtol(" str ", (char \(**\(**)\s-1NULL\s+1, 10)" . .PP .BI Atoi( str ) is equivalent to .BI ( int ") strtol(" "str" ", (char \(**\(**)\s-1NULL\s+1, 10)" . .SH SEE ALSO atof(3C), scanf(3S). .SH BUGS Overflow conditions are ignored. .\" @(#)strtol.3c 1.6 (** header trailer string \(**/ \f3struct ar_hdr\f1 /\(** file member header \(**/ \f3{\f1 \f3char ar_name[16];\f1 /\(** slash-terminated file member name \(**/ \f3char ar_date[12];\f1 /\(** file member date \(**/ \f3char ar_uid[6];\f1 /\(** file member user identification \(**/ \f3char ar_gid[6];\f1 /\(** file member group identification \(**/ \f3char ar_mode[8];\f1 /\(** file member mode \(**/ \f3char ar_size[10];\f1 /\(** file member size \(**/ \f3char ar_fmag[2];\f1 /\(** header trailer string \(**/ \f3};\f1 .fi .PP All information in the file member headers is in printable ASCII. The numeric information contained in the headers is stored as decimal numbers (except for \f2ar_mode\f1 which is in octal). Thus, if the archive contains printable files, the archive itself is printable. .PP The \f2ar_name\f1 field is blank-padded and slash (/) terminated. The \f2ar_date\f1 field is the modification date of the file at the time of its insertion into the archive. Common format archives can be moved fromnt(1M). .\" @(#)mnttab.4 1.3 .TH SWAB 3C .SH NAME swab \- swap bytes .SH SYNOPSIS .BR "void swab (" "from, to, nbytes" ) .br .BR "char \(**" "from" ", \(**" to ; .br .BR int " nbytes" ; .SH DESCRIPTION .I Swab\^ copies .I nbytes\^ bytes pointed to by .I from\^ to the array pointed to by .IR to , exchanging adjacent even and odd bytes. It is useful for carrying binary data between .SM PDP\*S-11s and other machines. .I Nbytes\^ should be even and non-negative. If .I nbytes\^ is odd and positive, .I swab\^ uses .IR nbytes \-1 instead. If .I nbytes\^ is negative, .I swab\^ does nothing. .\" @(#)swab.3c 1.4  m system to system as long as the portable archive command \f2ar\f1(1) is used. .PP Each archive file member begins on an even byte boundary; a newline is inserted between files if necessary. Nevertheless, the size given reflects the actual size of the file exclusive of padding. .PP Notice there is no provision for empty areas in an archive file. .PP If the archive symbol table exists, the first file in the archive has a zero length name (i.e., \f3ar_name[0] \= '/'\f1). The contents of this file are as follows: .TP 4 \(bu The number of symbols. Length: 4 bytes. .TP 4 \(bu The array of offsets into the archive file. Length: 4 bytes \(** ``the number of symbols''. .TP 4 \(bu The name string table. Length: \f2ar_size\f1 \- (4 bytes \(** (``the number of symbols'' +1)). The number of symbols and the array of offsets are managed with \f2sgetl\f1 and \f2sputl\f1. The string table contains exactly as many null terminated strings as there are elements in the offsets array. Each offset from the array is assoc.TH PASSWD 4 .SH NAME passwd \- password file .SH DESCRIPTION .I Passwd\^ contains the following information for each user: .RS .TP \(bu login name .TP \(bu encrypted password .TP \(bu numerical user .SM ID .TP \(bu numerical group .SM ID .TP \(bu .SM GCOS job number, box number, optional .SM GCOS user .SM ID .TP \(bu initial working directory .TP \(bu program to use as shell .RE .PP This is an \s-1ASCII\s0 file. Each field within each user's entry is separated from the next by a colon. The \s-1GCOS\s0 field is used only when communicating with that system, and in other installations can contain any desired information. Each user entry is separated from the next by a new-line. If the password field is null, no password is demanded; if the Shell field is null, the Shell itself is used. .PP This file resides in directory .BR /etc . Because of the encrypted passwords, it can and does have general read permission and can be used, for example, to map numerical user \s-1ID\s0s to names. .PP The encrypted password c.\" @(#)sys_nerr.3c 1.2 .so /usr/man/u_man/man3/perror.3c iated with the corresponding name from the string table (in order). The names in the string table are all the defined global symbols found in the common object files in the archive. Each offset is the location of the archive header for the associated symbol. .SH SEE ALSO ar(1), ld(1), strip(1), sputl(3X), a.out(4). .SH "WARNINGS" .IR Strip (1) will remove all archive symbol entries from the header. The archive symbol entries must be restored via the \fBs\fR option of the .IR ar (1) command before the archive can be used with the link editor .IR ld (1). .\" @(#)ar.4 1.8  onsists of 13 characters chosen from a 64-character alphabet .RB ( . ", " / , .BR 0\-9 ", " A\-Z ", " a\-z ). If the password is null, the encrypted password is also null. Password aging is effected for a particular user if the encrypted password in the password file is followed by a comma and a non-null string of characters from the above alphabet. Such a string must be introduced in the first instance by the superuser. .PP The first character of the password age, e.g., .IR M , denotes the maximum number of weeks for which a password is valid. A user who attempts to login after the password has expired will be forced to supply a new one. The next character, e.g., .IR m , denotes the minimum period (in weeks) which must expire before the password may be changed. The remaining characters define the week (counted from the beginning of 1970) when the password was last changed. A null string is equivalent to zero. \fIM\fR and \fIm\fR have numerical values in the range 0\-63 that correspond to the 64-character a.TH SYSTEM 3F .SH NAME system \- issue a shell command from FORTRAN .SH SYNOPSIS .BR "character \(**N" " c" .P .BR "call system(" c ) .SH DESCRIPTION .I System\^ causes its character argument to be given to .IR sh (1) as input, as if the string had been typed at a terminal. The current process waits until the shell has completed. .SH SEE ALSO sh(1), exec(2), system(3S). .\" @(#)system.3f 1.4 .TH CHECKLIST 4 .SH NAME checklist \- list of file systems processed by fsck .SH DESCRIPTION .I Checklist\^ resides in directory .B /etc and contains a list of at most 15 .IR "special file" "names." Each .IR "special file" "name" is contained on a separate line and corresponds to a file system. If no \fIfile-system\fR argument is provided to .IR fsck (1M), each file listed in \f3/etc/checklist\f1 is automatically read and checked for inconsistencies. .SH SEE ALSO fsck(1M). .\" @(#)checklist.4 1.4 lphabet shown above (i.e., .B / = 1 week; .B z = 63 weeks). If .IR "m " = " M " "= 0" (derived from the string .B . or .BR .. ) the password must be changed the next time the user logs in (and the ``age'' will disappear from the user's entry in the password file). If .IR "m " > " M" (signified, e.g., by the string .BR ./ ), only the superuser will be able to change the password. .SH FILES /etc/passwd .SH "SEE ALSO" login(1), passwd(1), a64l(3C), crypt(3C), getpwent(3C), group(4). .\" @(#)passwd.4 1.4  .TH SYSTEM 3S .SH NAME system \- issue a shell command .SH SYNOPSIS .B #include .PP .BR "int system (" string ) .br .BR "char \(**" string ; .SH DESCRIPTION .I System\^ causes .I string\^ to be given to .IR sh (1) as input, as if the string had been typed as a command at a terminal. The current process waits until the shell has completed, then returns the exit status of the shell. .SH FILES /bin/sh .SH "SEE ALSO" sh(1), exec(2). .SH DIAGNOSTICS .I System\^ forks to create a child process that in turn performs \fIexec\fP(2) on .I /bin/sh\^ in order to execute .IR string . If the fork or exec fails, .I system\^ returns \-1 and sets .IR errno . .\" @(#)system.3s 1.4 .TH CORE 4 .SH NAME core \- format of core image file .SH DESCRIPTION The system writes out a core image of a terminated process when any of various errors occur. .IR Signal (2) describes reasons for errors. The most common errors are memory violations, illegal instructions, bus errors, and user-generated quit signals. The core image is called .B core and is written in the working directory of the process (provided it can be; normal access controls apply). A process with an effective user .SM ID different from the real user .SM ID will not produce a core image. .PP The first section of the core image is a copy of the system's per-user data for the process, including the registers as they were at the time of the fault. The size of this section depends on the parameter .IR usize , which is defined in .BR /usr/include/sys/param.h . The remainder represents the actual contents of the user's core area when the core image was written. If the text segment is read-only and shared, or separated from data space, it is .TH PLOT 4 .SH NAME plot \- graphics interface .SH DESCRIPTION Files of this format are produced by routines described in .IR plot (3X) and are interpreted for various devices by commands described in .IR tplot (1G). A graphics file is a stream of plotting instructions. Each instruction consists of an \s-1ASCII\s+1 letter usually followed by bytes of binary information. The instructions are executed in order. A point is designated by 4 bytes representing the .B x and .B y values; each value is a signed integer. The last designated point in an .B "l, m, n," or .B p instruction becomes the ``current point'' for the next instruction. .PP Each of the following descriptions begins with the name of the corresponding routine in .IR plot (3X). .TP 3 .B m move:  The next 4 bytes give a new current point. .TP .B n cont: Draw a line from the current point to the point given by the next 4 bytes. See .IR tplot (1G). .TP .B p point: Plot the point given by the next 4 bytes. .TP .B l line: Draw a line from the p.TH TAN 3F .SH NAME tan, dtan \- FORTRAN tangent intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = tan(" "r1" ")" .P .RB "dp2" " = dtan(" "dp1" ")" .RB "dp2" " = tan(" "dp1" ")" .SH DESCRIPTION .I Tan\^ returns the real tangent of its real argument. .I Dtan\^ returns the double-precision tangent of its double-precision argument. The generic .I tan\^ function becomes .I dtan\^ as required with a double-precision argument. .SH SEE ALSO trig(3M). .\" @(#)tan.3f 1.4  not dumped. .PP The format of the information in the first section is described by the .I user\^ structure of the system, defined in .BR /usr/include/sys/user.h . The locations of the registers are outlined in .BR /usr/include/sys/reg.h . .SH "SEE ALSO" crash(1M), sdb(1), setuid(2), signal(2). .\" @(#)core.4 1.3 oint given by the next 4 bytes to the point given by the following 4 bytes. .TP .B t label: Place the following \s-1ASCII\s0 string so that its first character falls on the current point. The string is terminated by a new-line. .TP .B e erase: Start another frame of output. .TP .B f linemod: Take the following string, up to a new-line, as the style for drawing further lines. The styles are ``dotted'', ``solid'', ``longdashed'', ``shortdashed'', and ``dotdashed''. This instruction is effective only for the .B \-T4014 and .B \-Tver options of .IR tplot (1G) (Tektronix 4014 terminal and Versatec plotter). .TP .B s space: The next 4 bytes give the lower left corner of the plotting area; the following 4 give the upper right corner. The plot will be magnified or reduced to fit the device as closely as possible. .PP Space settings that exactly fill the plotting area with unity scaling appear below for devices supported by the filters of .IR tplot (1G). The upper limit is just outside the plotting area. In .\" @(#)tan.3m 1.2 .so /usr/man/u_man/man3/trig.3m '\" t .TH CPIO 4 .SH NAME cpio \- format of cpio archive .SH DESCRIPTION .PP When the .B \-c option of .IR cpio (1) is not used, the file header structure is: .PP .TS l l l. \f3struct {\f1 \f3short h_magic,\f1 \f3h_dev;\f1 \f3ushort h_ino,\f1 \f3h_mode,\f1 \f3h_uid,\f1 \f3h_gid;\f1 \f3short h_nlink,\f1 \f3h_rdev,\f1 \f3h_mtime[2],\f1 \f3h_namesize,\f1 \f3h_filesize[2];\f1 \f3char h_name[h_namesize rounded to word];\f1 \f3} Hdr;\f1 .TE .PP When the .B \-c option is used, the header information is described by: .PP .nf \f3sscanf(Chdr,"%6o%6o%6o%6o%6o%6o%6o%6o%11lo%6o%11lo%s",\f1 .RS \f3&Hdr.h_magic, &Hdr.h_dev, &Hdr.h_ino, &Hdr.h_mode,\f1 \f3&Hdr.h_uid, &Hdr.h_gid, &Hdr.h_nlink, &Hdr.h_rdev,\f1 \f3&Longtime, &Hdr.h_namesize,&Longfile,Hdr.h_name);\f1 .RE .fi .PP .I Longtime\^ and .I Longfile\^ are equivalent to .I Hdr.h_mtime\^ and .IR Hdr.h_filesize , respectively. The contents of each file are recorded in an element of the array of varying length structures, .IR archive , together with othe every case the plotting area is taken to be square; points outside may be displayable on devices whose face is not square. .PP .RS .PD 0 .TP 18 .SM DASI \*S300 space(0, 0, 4096, 4096); .TP .SM DASI \*S300s space(0, 0, 4096, 4096); .TP .SM DASI \*S450 space(0, 0, 4096, 4096); .TP Tektronix 4014 space(0, 0, 3120, 3120); .TP Versatec plotter space(0, 0, 2048, 2048); .PD .RE .SH SEE ALSO graph(1G), tplot(1G), plot(3X), gps(4), term(5). .\" @(#)plot.4 1.3 .TH TANH 3F .SH NAME tanh, dtanh \- FORTRAN hyperbolic tangent intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = tanh(" "r1" ")" .P .RB "dp2" " = dtanh(" "dp1" ")" .RB "dp2" " = tanh(" "dp1" ")" .SH DESCRIPTION .I Tanh\^ returns the real hyperbolic tangent of its real argument. .I Dtanh\^ returns the double-precision hyperbolic tangent of its double precision argument. The generic form .I tanh\^ may be used to return a double-precision value given a double-precision argument. .SH SEE ALSO sinh(3M). .\" @(#)tanh.3f 1.4 r items describing the file. Every instance of .I h_magic\^ contains the constant 070707 (octal). The items .I h_dev\^ through .I h_mtime\^ have meanings explained in .IR stat (2). The length of the null-terminated pathname .IR h_name , including the null byte, is given by .IR h_namesize . .PP The last record of the .I archive\^ always contains the name \s-1TRAILER!!!\s0. Special files, directories, and the trailer are recorded with .I h_filesize\^ equal to zero. .SH "SEE ALSO" cpio(1), find(1), stat(2). .\" @(#)cpio.4 1.4 .TH PNCH 4 .SH NAME pnch \- file format for card images .SH DESCRIPTION The \s-1PNCH\s0 format is a convenient representation for files consisting of card images in an arbitrary code. .PP A \s-1PNCH\s0 file is a simple concatenation of card records. A card record consists of a single control byte followed by a variable number of data bytes. The control byte specifies the number (which must lie in the range 0-80) of data bytes that follow. The data bytes are 8-bit codes that constitute the card image. If there are fewer than 80 data bytes, it is understood that the remainder of the card image consists of trailing blanks. .SH SEE ALSO send(1C). .\" @(#)pnch.4 1.2  .\" @(#)tanh.3m 1.2 .so /usr/man/u_man/man3/sinh.3m .TH DIR 4 .SH NAME dir \- format of directories .SH SYNOPSIS .B #include .SH DESCRIPTION A directory behaves exactly like an ordinary file, except that no user may write into a directory. The fact that a file is a directory is indicated by a bit in the flag word of its inode entry (see .IR fs (4)). The structure of a directory entry as given in the include file is: .RS .ta 8n +6n +6n .PP .nf \f3#ifndef \s-1DIRSIZ\s+1\f1 \f3#define \s-1DIRSIZ\s+1 14\f1 \f3#endif\f1 \f3struct direct\f1 \f3{\f1 \f3ino_t d_ino;\f1 \f3char d_name[\s-1DIRSIZ\s+1];\f1 \f3};\f1 .fi .RE .PP By convention, the first two entries in each directory are for ``\fB.\fR'' and ``\fB.\|.\fR''. The first is an entry for the directory itself. The second is for the parent directory. The meaning of ``\fB.\|.\fR'' is modified for the root directory of the master file system; because there is no parent, ``\fB.\|.\fR'' has the same meaning as ``\fB.\fR''. .SH "SEE ALSO" fs(4). .\" @(#)dir.4 1.4 .TH PROFILE 4 .SH NAME profile \- setting up an environment at login time .SH DESCRIPTION If a user's login directory contains a file named .BR \&.profile , that file will be executed (via the shell's .BR "exec .profile" ) before the user's session begins; .BR \&.profile s are handy for setting exported environment variables and terminal modes. If the file .B /etc/profile exists, it will be executed for every user before the .BR .profile . The following example is typical (except for the comments): .nf .PP # Make some environment variables global \f3export \s-1MAIL\s0 \s-1PATH\s0 \s-1TERM\s0\f1 # Set file creation mask \f3umask 22\f1 # Tell me when new mail comes in \f3\s-1MAIL\s0=/usr/mail/myname\f1 # Add my /bin directory to the shell search sequence \f3\s-1PATH\s0=\s-1$PATH\s0:\s-1$HOME\s0/bin\f1 # Set terminal type .if t .ta .5i 1.3i .if n .ta 2n 12n \f3echo "terminal\f3:\fP \^\e\|c"\f1 \f3read \s-1TERM\s0\f1 \f3case \s-1$TERM\s0 in\f1 \f3300) stty cr2 nl0 tabs; tabs;;\f1 \f3300s) stty cr2 nl0 tabs.\" @(#)tdelete.3c 1.2 .so /usr/man/u_man/man3/tsearch.3c  '\" t .TH ERRFILE 4 .SH NAME errfile \- error-log file format .SH DESCRIPTION When hardware errors are detected by the system, an error record is generated and passed to the error-logging daemon for recording in the error log for later analysis. The default error log is .BR /usr/adm/errfile . .PP The format of an error record depends on the type of error that was encountered. Every record, however, has a header with the following format: .PP .ne 5 .ta .5i 1.5i 2.5i .nf \f3struct errhdr {\f1 \f3short e_type;\f1 /\(** record type \(**/ \f3short e_len;\f1 /\(** bytes in record (inc hdr) \(**/ \f3time_t e_time;\f1 /\(** time of day \(**/ \f3};\f1 .fi .PP The permissible record types are as follows: .PP .ne 10 .ta 2i 2.5i .nf \f3#define \s-1E_GOTS\s+1 010\f1 /\(** start for the \s-1UNIX/TS\s+1\(**/ \f3#define \s-1E_GORT\s+1 011\f1 /\(** start for the \s-1UNIX/RT\s+1\(**/ \f3#define \s-1E_STOP\s+1 012\f1 /\(** stop \(**/ \f3#define \s-1E_TCHG\s+1 013\f1 /\(** time change \(**/ \f3#define \s-1E_CCHG\s+1 014\f1 /\; tabs;;\f1 \f3450) stty cr2 nl0 tabs; tabs;;\f1 \f3hp) stty cr0 nl0 tabs; tabs;;\f1 \f3745\||\^735) stty cr1 nl1 \-tabs; \s-1TERM\s0=745;;\f1 \f343) stty cr1 nl0 \-tabs;;\f1 \f34014\||\^tek) stty cr0 nl0 \-tabs f\&f1; \s-1TERM\s0=4014; echo "\e\|33;";;\f1 \f3\(**) echo "\s-1$TERM\s0 unknown";;\f1 \f3esac\f1 .RE .fi .DT .SH FILES \s-1$HOME\s+1/\f3.\fPprofile .br /etc/profile .SH SEE ALSO env(1), login(1), mail(1), sh(1), stty(1), su(1), environ(5), term(5). .\" @(#)profile.4 1.5 cro .SM .BI UNGETC\*S( c ) is always ignored. .TP 20 .SM .BI RETURN\*S( pointer ) This macro is used on normal exit of the .I compile\^ routine. The value of the argument .I pointer\^ is a pointer to the character after the last character of the compiled regular expression. This is useful to programs which have memory allocation to manage. .TP 20 .SM .BI ERROR\*S( val ) This is the abnormal return from the .I compile\^ routine. The argument .I val\^ is an error number (see table below for meanings). This call should never return. .PP .ne 14 .RS .PD 0 .TP 1i ERROR MEANING .TP 11 Range endpoint too large. .TP 16 Bad number. .TP 25 ``\f3\e\fP\|digit'' out of range. .TP 36 Illegal or missing delimiter. .TP 41 No remembered search string. .TP 42 \f3\e\|(\|~\e\|)\fP imbalance. .TP 43 Too many \f3\e\|(\fP. .TP 44 More than 2 numbers given in \f3\e\|{\|~\e\|}\fP. .TP 45 \f3}\fP expected after \f3\e\fP\|. .TP 46 First number exceeds second in \f3\e\|{\|~\e\|}\fP. .TP 49 \f3[ ]\fP imbalance. .TP 50 Regular expression othings like substituting named star catalogs, smoothing nutation and aberration to aid generation of mean places of stars, and making conventional adjustments to the Moon to improve eclipse predictions. .PP For the most accurate use of the program it is necessary to know that it actually runs in Ephemeris time. .SH "SEE ALSO" .ft I .IR "American Ephemeris and Nautical Almanac" , for the appropriate years; also, the .IR "Explanatory Supplement to the American Ephemeris and Nautical Almanac" . .\" @(#)sky.6 1.3  .TH RELOC 4 .SH NAME reloc \- relocation information for a common object file .SH SYNOPSIS .B #include .SH DESCRIPTION Object files have one relocation entry for each relocatable reference in the text or data. If relocation information is present, it will be in the following format. .PP .if t .RS .ta \w'#define\ \ 'u +\w'R_DIR32S\ \ 'u +\w'r_symndx\ ;\ \ 'u .nf .lg 0 \f3struct reloc\f1 \f3{\f1 \f3long r_vaddr ;\f1 /\(** (virtual) address of reference \(*\(**/ \f3long r_symndx ;\f1 /\(** index into symbol table \(*\(**/ \f3short r_type ;\f1 /\(** relocation type \(*\(**/ \f3} ;\f1 .if '\*p'b16' \{\ \f3#define R_ABS 0\f1 \f3#define R_DIR16 01\f1 \f3#define R_REL16 02\f1 \f3#define R_IND16 03\f1 \} .if '\*p'x86' \{\ \f3#define R_ABS 0\f1 \f3#define R_DIR16 01\f1 \f3#define R_REL16 02\f1 \f3#define R_IND16 03\f1 \f3#define R_OFF8 07\f1 \f3#define R_OFF16 010\f1 \f3#define R_SEG12 011\f1 \f3#define R_AUX 013\f1 \} .if '\*p'3b' \{\ \f3#define R_ABS 0\f1 \f3#define R_DIR24 04\f1 \f3#define R_REL24 05\verflow. .RE .PD .PP The syntax of the .I compile\^ routine is as follows: .PP .RS compile(instring, expbuf, endbuf, eof) .RE .PP The first parameter .I instring\^ is never used explicitly by the .I compile\^ routine but is useful for programs that pass down different pointers to input characters. It is sometimes used in the .SM INIT declaration (see below). Programs which call functions to input characters or have characters in an external array can pass down a value of ((char \(**) 0) for this parameter. .PP The parameter .I expbuf\^ is a character pointer. It points to the place where the compiled regular expression will be placed. .PP The parameter .I endbuf\^ is one more than the highest address where the compiled regular expression may be placed. If the compiled expression cannot fit in .RI ( endbuf \- expbuf ) bytes, a call to .SM ERROR\*S(50) is made. .PP The parameter .I eof\^ is the character that marks the end of the regular expression. For example, in .IR ed (1), this character is usually a .BR / .TH TTT 6 .SH NAME ttt, cubic \- tic-tac-toe .SH SYNOPSIS .B /usr/games/ttt .br .B /usr/games/cubic .SH DESCRIPTION .I Ttt\^ is the X and O game popular in the first grade. This is a learning program that never makes the same mistake twice. .PP Although it learns, it learns slowly. It must lose nearly 80 games to completely know the game. .PP .I Cubic\^ plays three-dimensional tic-tac-toe on a 4\(mu4\(mu4 board. Moves are specified as a sequence of three coordinate numbers in the range 1-4. .SH FILES /usr/games/ttt.k learning file .SH BUGS .I Cubic\^ does not yet work on the .SM VAX\*S. .\" @(#)ttt.6 1.2 f1 \f3#define R_DIR32 06\f1 \f3#define R_OPT16 014\f1 \f3#define R_IND24 015\f1 \f3#define R_IND32 016\f1 \} .if '\*p'm32' \{\ \f3#define R_ABS 0\f1 \f3#define R_DIR32 06\f1 \f3#define R_DIR32S 012\f1 \} .if '\*p'' \{\ /\(** * All generics * reloc. already performed to symbol in the same section \(**/ \f3#define R_ABS 0\f1 /\(** * DEC Processors VAX 11/780 and VAX 11/750 * \(**/ \f3#define R_RELBYTE 017\f1 \f3#define R_RELWORD 020\f1 \f3#define R_RELLONG 021\f1 \f3#define R_PCRBYTE 022\f1 \f3#define R_PCRWORD 023\f1 \f3#define R_PCRLONG 024\f1 /\(** * Motorola 68000 uses \f3R_RELBYTE\f1, \f3R_RELWORD\f1, \f3R_RELLONG\f1, * \f3R_PCRBYTE\f1, and \f3R_PCRWORD\f1 as for DEC machines above. \(**/ \} .fi .lg .if t .RE .PP As the link editor reads each input section and performs relocation, the relocation entries are read. They direct how references found within the input section are treated. .TP 15 \f3R_ABS\f1 The reference is absolute, and no relocation is necessary. The entry will be ignored. .TP  . .PP Each program that includes this file must have a .B #define statement for .SM INIT\*S. This definition will be placed right after the declaration for the function .I compile\^ and the opening curly brace .RB ( { ). It is used for dependent declarations and initializations. Most often it is used to set a register variable to point the beginning of the regular expression so that this register variable can be used in the declarations for .SM \f3GETC\*S(\|)\f1, .SM \f3PEEKC\*S(\|)\f1, and .SM \f3UNGETC\*S(\|)\f1. Otherwise it can be used to declare external variables that might be used by .SM \f3GETC\*S(\|)\f1, .SM \f3PEEKC\*S(\|)\f1, and .SM \f3UNGETC\*S(\|)\f1. See the example below of the declarations taken from .IR grep (1). .PP There are other functions in this file which perform actual regular expression matching, one of which is the function .IR step . The call to .I step\^ is as follows: .PP .RS step(string, expbuf) .RE .PP The first parameter to .I step\^ is a pointer to a string of characters to b.TH WUMP 6 .SH NAME wump \- the game of hunt-the-wumpus .SH SYNOPSIS .B /usr/games/wump .SH DESCRIPTION .I Wump\^ plays the game of ``Hunt the Wumpus.''\ A Wumpus is a creature that lives in a cave with several rooms connected by tunnels. You wander among the rooms, trying to shoot the Wumpus with an arrow, meanwhile avoiding being eaten by the Wumpus and falling into Bottomless Pits. There are also Super Bats which are likely to pick you up and drop you in some random room. .PP The program asks various questions which you answer one per line; it will give a more detailed description if you want. .PP This program is based on one described in .IR "People's Computer Company" , 2, 2 (November 1973). .SH BUGS It will never replace Adventure. .\" @(#)wump.6 1.2  15 \f3R_RELBYTE\f1 A direct 8-bit reference to a symbol's virtual address. .TP 15 \f3R_RELWORD\f1 A direct 16-bit reference to a symbol's virtual address. .TP 15 \f3R_RELLONG\f1 A direct 32-bit reference to a symbol's virtual address. .TP 15 \f3R_PCRBYTE\f1 A ``PC-relative'' 8-bit reference to a symbol's virtual address. .TP 15 \f3R_PCRWORD\f1 A ``PC-relative'' 16-bit reference to a symbol's virtual address. .TP 15 \f3R_PCRLONG\f1 A ``PC-relative'' 32-bit reference to a symbol's virtual address. .PP On the .SM VAX processors, relocation of a symbol index of -1 indicates that the relative difference between the current segment's start address and the program's load address is added to the relocatable address. \} .PP Other relocation types will be defined as they are needed. .PP Relocation entries are generated automatically by the assembler and automatically utilized by the link editor. A link editor option exists for removing the relocation entries from an object file. .SH "SEE ALSO" \*pld(1), \*pstrip(1), \*e checked for a match. This string should be null terminated. .PP The second parameter .I expbuf\^ is the compiled regular expression which was obtained by a call of the function .IR compile . .PP The function .I step\^ returns one, if the given string matches the regular expression, and zero, if the expressions do not match. If there is a match, two external character pointers are set as a side effect to the call to .IR step . The variable set in .I step\^ is .IR loc1 . This is a pointer to the first character that matched the regular expression. The variable .IR loc2 , which is set by the function .IR advance , points to the character after the last character that matches the regular expression. Thus, if the regular expression matches the entire line, loc1 will point to the first character of .I string\^ and .I loc2\^ will point to the null at the end of .IR string . .PP .I Step\^ uses the external variable .I circf\^ which is set by .I compile\^ if the regular expression begins with .BR ^ . If this is set, rt address of a word, in which case a value of \-1 is returned to the parent process and the parent's .I errno\^ is set to .SM \%EIO. .TP 5 .B 3 With this request, the word at location .I addr\^ in the child's .SM USER area in the system's address space (see .B ) is returned to the parent process. Addresses in this area range from 0 to 1024 on the .SM PDP\*S-11s and 0 to 2048 on the .SM 3B20S\*S, .SM VAX\*S, and M68000. The .I data\^ argument is ignored. This request fails if .I addr\^ is not the start address of a word or is outside the .SM USER area, in which case a value of \-1 is returned to the parent process and the parent's .I errno\^ is set to .SM EIO. .TP 5 .B 4, 5 With these requests, the value given by the .I data\^ argument is written into the address space of the child at location .IR addr . If I and D space are separated, request 4 writes a word into I space and request 5 writes a word into D space. If I and D space are not separated, either request 4 or request 5 may be used with eqpa.out(4), syms(4). '\" \%W\% .\" @(#)reloc.4 1.5  .I step\^ will only try to match the regular expression to the beginning of the string. If more than one regular expression is to be compiled before the first is executed the value of .I circf\^ should be saved for each compiled expression and .I circf\^ should be set to that saved value before each call to .IR step . .PP The function .I advance\^ is called from .I step\^ with the same arguments as .IR step . The purpose of .I step\^ is to step through the .I string\^ argument and call .IR advance ; \fIstep\fR continues until .I advance\^ returns a one indicating a match or until the end of .I string\^ is reached. If one wants to constrain .I string\^ to the beginning of the line in all cases, .I step\^ need not be called; simply call .IR advance . .PP When .I advance\^ encounters a \f3\(**\fP or \f3\e\|{\|~\e\|}\fP sequence in the regular expression, it will advance its pointer to the string to be matched as far as possible and will recursively call itself trying to match the rest of the string to the rest ual results. Upon successful completion, the value written into the address space of the child is returned to the parent. These two requests fail if .I addr\^ is a location in a pure procedure space and another process is executing in that space, or if .I addr\^ is not the start address of a word. Upon failure a value of \-1 is returned to the parent process and the parent's .I errno\^ is set to .SM EIO\*S. .TP 5 .B 6 With this request, a few entries in the child's .SM USER area can be written. .I Data\^ gives the value that is to be written and .I addr\^ is the location of the entry. The few entries that can be written are: .RS .IP the general registers (i.e., registers 0\-11 on the .SM 3B20S, registers 0\-7 on .SM PDP\*S-11s, and registers 0\-15 on the .SM VAX\*S and M68000) .IP certain bits of the Processor Status Word on the M68000 and M68010 (i.e., bits 0\-4 and 15) .IP the condition codes of the Processor Status Word on the .SM 3B20S . .IP the floating point status register and six floating point regist .tr ~ .bd S B 3 .ds K) \fB\s-1DATA KEYWORDS\s+1\fR .ds D) \fB\s-1DDDDD\s+1\fR .ds M) \fB\s-1MR\s+1\fR .ds S) \s-1SCCS\s+1 .ds I) \s-1SID\s+1 .TH SCCSFILE 4 .SH NAME sccsfile \- format of \s-1SCCS\s+1 file .SH DESCRIPTION An \*(S) file is an \s-1ASCII\s+1 file. It consists of 6 logical parts: the .IR checksum , the .I "delta table"\^ (information about each delta), .I "user names"\^ (login names and/or numerical group \s-1ID\s+1s of users who may add deltas), .I flags\^ (definitions of internal keywords), .I comments\^ (arbitrary descriptive information about the file), and the .I body\^ (the actual text lines intermixed with control lines). .PP Throughout an \*(S) file there are lines which begin with the \fB\s-1ASCII SOH\s+1\fR (start of heading) character (octal 001). This character is hereafter referred to as .I "the control character"\^ and will be represented graphically as @. Any line described below which is not depicted as beginning with the control character is prevented from beginning with the of the regular expression. As long as there is no match, .I advance\^ will back up along the string until it finds a match or reaches the point in the string that initially matched the \f3\(**\fP or \f3\e\|{\|~\e\|}\fP. It is sometimes desirable to stop this backing up before the initial point in the string is reached. If the external character pointer .I locs\^ is equal to the point in the string at sometime during the backing up process, .I advance\^ will break out of the loop that backs up and will return zero. This is used by .IR ed (1) and .IR sed (1) for substitutions done globally (not just the first occurrence, but the whole line); for example, expressions like .B s/y\(**//g do not loop forever. .PP The routines .IR ecmp and .I getrange\^ are trivial and are called by the routines previously mentioned. .SH EXAMPLES The following is an example of how the regular expression macros and calls look from .IR grep (1): .if t .ta 12 .in n .ta 20 .PP .nf \f3#define \s-1INIT\s+1 register char \(**sp = instring2nkheb_\YVSPMJGDA>;852/,)&#  control character. .PP Entries of the form \*(D) represent a 5-digit string (a number between 00000 and 99999). .PP Each logical part of an \*(S) file is described in detail below. .TP .I Checksum\^ The checksum is the first line of an \*(S) file. The form of the line is: .if !\ns .sp .ti +5 @\fBh\*(D)\fR .br .sp The value of the checksum is the sum of all characters, except those of the first line. The @\fBh\fR provides a .I "magic number"\^ of (octal) 064001. .TP .I "Delta table"\^ The delta table consists of a variable number of entries of the form: .if !\ns .in +5 .if \ns .sp .if \ns .ps -1 .nf @\fBs\fR \*(D)/\*(D)/\*(D) .if t @\fBd\fR <\fB\s-1SCCS ID\s+1\fR> yr/mo/da hr:mi:se \*(D) \*(D) .if n @d <\fB\s-1SCCS ID\s+1\fR> yr/mo/da hr:mi:se \*(D) \*(D) @\fBi\fR \*(D) \fB...\fR @\fBx\fR \*(D) \fB...\fR @\fBg\fR \*(D) \fB...\fR @\fBm\fR <\*(M) number> \fB.\fR \fB.\fR \fB.\fR @\fBc\fR \fB...\fR \fB.\fR \fB.\fR \fB.\fR @\fBe\fR .fi .if !\ns .in -5 .if \ns . ;\f1 \f3#define \s-1GETC\s+1(\|) (\(**sp\++)\f1 \f3#define \s-1PEEKC\s+1(\|) (\(**sp)\f1 \f3#define \s-1UNGETC\s+1(c) (\-\-sp)\f1 \f3#define \s-1RETURN\s+1(c) return;\f1 \f3#define \s-1ERROR\s+1(c) regerr(\|)\f1 .PP \f3#include \f1 \f3\&...\f1 .ta 8 16 \f3compile(\(**argv, expbuf, &expbuf[\s-1ESIZE\s+1], \(fm\e\|0\(fm);\f1 \f3\&...\f1 \f3if(step(linebuf, expbuf))\f1 \f3succeed(\|);\f1 .fi .SH FILES /usr/include/regexp.h .SH "SEE ALSO" ed(1), grep(1), sed(1). .SH BUGS The routine .IR ecmp is equivalent to the Standard I/O routine .I strncmp\^ and should be replaced by that routine. .tr ~~ .\" @(#)regexp.5 1.5 sets the trace bit in the Processor Status Word of the child (i.e., bit 4 on .SM PDP\*S-11s; bit 30 on the .SM VAX\*S; bit 15 on the M68000) and then executes the same steps as listed above for request .BR 7 . The trace bit causes an interrupt upon completion of one machine instruction. This effectively allows single stepping of the child. On the .SM 3B20S there is no trace bit and this request returns an error. .br Note: the trace bit remains set after an interrupt on .SM PDP\*S-11s but is turned off after an interrupt on the .SM VAX\*S and M68000. .RE .PP To forestall possible fraud, .I ptrace\^ inhibits the set-user-id facility on subsequent .IR exec (2) calls. If a traced process calls .IR exec , it stops before executing the first instruction of the new image showing signal .SM .BR SIGTRAP . .SH GENERAL ERRORS .I Ptrace\^ in general fails if one or more of the following are true: .IP .I Request\^ is an illegal number. .SM \%[EIO] .IP .I Pid\^ identifies a child that does not exist or has not executed a ps +1 .sp The first line (@\fBs\fR) contains the number of lines inserted/deleted/unchanged respectively. The second line (@\fBd\fR) contains the type of the delta (currently, normal: \fB\s-1D\fR\s+1, and removed: \s-1\fBR\s+1\fR), the \*(S) \s-1ID\s+1 of the delta, the date and time of creation of the delta, the login name corresponding to the real user \s-1ID\s+1 at the time the delta was created, and the serial numbers of the delta and its predecessor. .sp The @\fBi\fR, @\fBx\fR, and @\fBg\fR lines contain the serial numbers of deltas included, excluded, and ignored, respectively. These lines are optional. .sp The @\fBm\fR lines (optional) each contain one \*(M) number associated with the delta; the @\fBc\fR lines contain comments associated with the delta. .sp The @\fBe\fR line ends the delta table entry. .TP .I "User names"\^ The list of login names and/or numerical group \s-1ID\s+1s of users who may add deltas to the file, separated by new-lines. The lines containing these login names and/or numerical g'\" t .TH STAT 5 .SH NAME stat \- data returned by stat system call .SH SYNOPSIS .B #include .br .B #include .SH DESCRIPTION The system calls .I stat\^ and .I fstat return data whose structure is defined by this include file. The encoding of the field .I st_mode\^ is defined in this file also. .PP .nf /* * Structure of the result of stat */ .TS l l l. \f3struct stat\f1 \f3{\f1 \f3dev_t st_dev;\f1 \f3ino_t st_ino;\f1 \f3ushort st_mode;\f1 \f3short st_nlink;\f1 \f3ushort st_uid;\f1 \f3ushort st_gid;\f1 \f3dev_t st_rdev;\f1 \f3off_t st_size;\f1 \f3time_t st_atime;\f1 \f3time_t st_mtime;\f1 \f3time_t st_ctime;\f1 \f3};\f1 .TE .sp 1v .TS l1 l1p-1 l1 l. \f3#define S_IFMT 0170000\f1 /\(** type of file \(**/ \f3#define S_IFDIR 0040000\f1 /\(** directory \(**/ \f3#define S_IFCHR 0020000\f1 /\(** character special \(**/ \f3#define S_IFBLK 0060000\f1 /\(** block special \(**/ \f3#define S_IFREG 0100000\f1 /\(** regular \(**/ \f3#define S_IFIFO 0010000\f1 /\(** fifo \(**/ \f3#def .I ptrace\^ with request .BR 0 . .SM \%[ESRCH] .SH SEE ALSO sdb(1), exec(2), signal(2), wait(2). .\" @(#)ptrace.2 1.7 roup \s-1ID\s+1s are surrounded by the bracketing lines @\fBu\fR and @\fBU\fR. An empty list allows anyone to make a delta. .TP .I Flags\^~~~~~ Keywords used internally (see .IR admin (1) for more information on their use). Each flag line takes the form: .sp .ti +5 @\fBf\fR .br .sp The following flags are defined: .ti +5 @\fBf\fR t .ti +5 @\fBf\fR v .ti +5 @\fBf\fR i .ti +5 @\fBf\fR b .ti +5 @\fBf\fR m .ti +5 @\fBf\fR f .ti +5 @\fBf\fR c .ti +5 @\fBf\fR d .ti +5 @\fBf\fR n .ti +5 @\fBf\fR j .ti +5 @\fBf\fR l .ti +5 @\fBf\fR q .ti +5 @\fBf\fR z .br .sp The .B t flag defines the replacement for the \s-1\fB%\&Y%\s+1\fR identification keyword. The .B v flag controls prompting for \*(M) numbers in addition to comments; if the optional text is present, it defines an \*(M) number validity checking program. The .B i flag controls the warning/error aspectine S_ISUID 04000\f1 /\(** set user id on execution \(**/ \f3#define S_ISGID 02000\f1 /\(** set group id on execution \(**/ \f3#define S_ISVTX 01000\f1 /\(** save swapped text even after use \(**/ \f3#define S_IREAD 00400\f1 /\(** read permission, owner \(**/ \f3#define S_IWRITE 00200\f1 /\(** write permission, owner \(**/ \f3#define S_IEXEC 00100\f1 /\(** execute/search permission, owner \(**/ .TE .fi .SH FILES /usr/include/sys/types.h .br /usr/include/sys/stat.h .SH SEE ALSO stat(2), types(5). .\" @(#)stat.5 1.3 .TH READ 2 .SH NAME read \- read from file .SH SYNOPSIS .BR "int read (" "fildes, buf, nbyte" ) .br .BR int " fildes" ; .br .BR "char \(**" "buf" ; .br .BR unsigned " nbyte" ; .SH DESCRIPTION .I Fildes\^ is a file descriptor obtained from a .IR creat , .IR open , .IR dup , .IR fcntl , or .I pipe\^ system call. .PP .I Read\^ attempts to read .I nbyte\^ bytes from the file associated with .I fildes\^ into the buffer pointed to by .IR buf . .PP On devices capable of seeking, the .I read\^ starts at a position in the file given by the file pointer associated with .IR fildes . Upon return from .IR read , the file pointer is incremented by the number of bytes actually read. .PP Devices that are incapable of seeking always read from the current position. The value of a file pointer associated with such a file is undefined. .PP Upon successful completion, .I read\^ returns the number of bytes actually read and placed in the buffer; this number may be less than .I nbyte\^ if the file is associated with a communicatio  of the ``\fBNo id keywords\fR'' message. When the .B i flag is not present, this message is only a warning; when the .B i flag is present, this message will cause a ``fatal'' error (i.e., the file will not be gotten, or the delta will not be made). When the .B b flag is present, the .B \-b keyletter may be used with the .I get\^ command to create a branch in the delta tree. The .B m flag defines the first choice for the replacement text of the \s-1\fB%\&M%\s+1\fR identification keyword. The .B f flag defines the ``floor'' release, i.e., the release below which no deltas may be added. The .B c flag defines the ``ceiling'' release, i.e., the release above which no deltas may be added. The .B d flag defines the default \*(I) to be used when none is specified on a .I get\^ command. The .B n flag causes .I delta\^ to insert a ``null'' delta (a delta that applies .I no\^ changes) in those releases that are skipped when a delta is made in a .I new\^ release (e.g., when delta 5.1 is made after delta 2.7, releases 3 .TH TERM 5 .SH NAME term \- conventional names for terminals .SH DESCRIPTION The names in this file are used by certain commands (e.g., .IR nroff , .IR mm (1), .IR man (1), .IR tabs (1)) and are maintained as part of the shell environment (see .IR sh (1), .IR profile (4), and .IR environ (5)) in the variable .SM .BR $TERM\*S : .PP .nf .ta \w'300s\-12 'u 1520 Datamedia 1520 155 Motorola EXORterm 155 1620 Diablo 1620 and others using the HyType II printer 1620\-12 same, in 12-pitch mode 165 Motorola EXORset 165 2621 Hewlett-Packard \s-1HP\s+12621 series 2631 Hewlett-Packard 2631 line printer 2631\-c Hewlett-Packard 2631 line printer - compressed mode 2631\-e Hewlett-Packard 2631 line printer - expanded mode 2640 Hewlett-Packard \s-1HP\s+12640 series 2645 Hewlett-Packard \s-1HP\s+1264n series (other than the 2640 series) 300 \s-1DASI/DTC/GSI\s+1 300 and others using the HyType I printer 300\-12 same, in 12-pitch mode 300s \s-1DASI/DTC/GSI\s+1 300s 382 \s-1DTC\s+1 382 300s\-12 same, in 12-pitch mode 3045 Datamen line (see .IR ioctl (2) and .IR termio (7)), or if the number of bytes left in the file is less than .I nbyte\^ bytes. A value of 0 is returned when an end-of-file has been reached. .PP When attempting to read from an empty pipe (or .SM FIFO\*S): .IP If .SM .B O_NDELAY is set, the read returns a 0. .IP If .SM .B O_NDELAY is clear, the read blocks until data is written to the file or the file is no longer open for writing. .PP When attempting to read a file associated with a tty that has no data currently available: .IP If .SM .B O_NDELAY is set, the read returns a 0. .IP If .SM .B O_NDELAY is clear, the read blocks until data becomes available. .PP .I Read\^ fails if one or more of the following are true: .IP .I Fildes\^ is not a valid file descriptor open for reading. .SM \%[EBADF] .IP .I Buf\^ points outside the allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion a non-negative integer is returned indicating the number of bytes actually read. Otherwise, a \-1 is returned and 4 are skipped). The absence of the .B n flag causes skipped releases to be completely empty. The .B j flag causes .I get\^ to allow concurrent edits of the same base \*(I). The .B l flag defines a .I list\^ of releases that are .I locked\^ against editing (\c .IR get (1) with the .B \-e keyletter). The .B q flag defines the replacement for the \s-1\fB%\&Q%\s+1\fR identification keyword. The .B z flag is used in certain specialized interface programs. .TP .I Comments\^ Arbitrary text surrounded by the bracketing lines @\fBt\fR and @\fBT\fR. The comments section typically will contain a description of the file's purpose. .TP .I Body~~~~~\^ The body consists of text lines and control lines. Text lines don't begin with the control character; only control lines do. There are three kinds of control lines: .IR insert , ~delete , and .IR end , represented by: .sp .ti +5 \s-1@\fBI\fR\s+1 \*(D) .ti +5 \s-1@\fBD\fR\s+1 \*(D) .ti +5 \s-1@\fBE\fR\s+1 \*(D) .br .sp respectively. The digit string is the serial number co dia 3045 33 \s-1TELETYPE\s+1\*R Terminal Model 33 \s-1KSR\s+1 37 \s-1TELETYPE\s+1 Terminal Model 37 \s-1KSR\s+1 40\-2 \s-1TELETYPE\s+1 Terminal Model 40/2 40\-4 \s-1TELETYPE\s+1 Terminal Model 40/4 4540 \s-1TELETYPE\s+1 Terminal Model 4540 3270 \s-1IBM\s+1 Model 3270 4000a Trendata 4000a 4014 Tektronix 4014 43 \s-1TELETYPE\s+1 Model 43 \s-1KSR\s+1 450 \s-1DASI\s+1 450 (same as Diablo 1620) 450\-12 same, in 12-pitch mode 735 Texas Instruments \s-1TI\s+1735 and \s-1TI\s+1725 745 Texas Instruments \s-1TI\s+1745 dumb generic name for terminals that lack reverse line-feed and other special escape sequences sync generic name for synchronous \s-1TELETYPE\s+1 4540-compatible terminals hp Hewlett-Packard (same as 2645) lp generic name for a line printer tn1200 General Electric TermiNet 1200 tn300 General Electric TermiNet 300 tvi950 TeleVideo 950 .fi .sp Local changes to this list are common. Refer to \f3/etc/termcap\f1 for information on terminals supported for your system. .PP Up to 8 characters, chosen from [\-aand .I errno\^ is set to indicate the error. .SH "SEE ALSO" creat(2), dup(2), fcntl(2), ioctl(2), open(2), pipe(2), termio(7). .\" @(#)read.2 1.5 rresponding to the delta for the control line. .SH "SEE ALSO" admin(1), delta(1), get(1), prs(1). .br ``Source Code Control System User's Guide'' in the .IR "\*(6) User's Guide" . .tr ~~ .\" @(#)sccsfile.4 1.4 \-z0\-9], make up a basic terminal name. Terminal sub-models and operational modes are distinguished by suffixes beginning with a \f3\-\fP. Names should be based on original vendors, rather than local distributors. A terminal acquired from one vendor should not have more than one distinct basic name. .PP Commands whose behavior depends on the type of terminal should accept arguments of the form .BI \-T term\^ where .I term\^ is one of the names given above; if no such argument is present, such commands should obtain the terminal type from the environment variable .SM .BR $TERM\*S , which, in turn, should contain .IR term . .SH SEE ALSO mm(1), nroff(1), tplot(1G), sh(1), stty(1), tabs(1), profile(4), environ(5). .SH BUGS Programs that should make use of this file do not adhere to the nomenclature in a consistent manner. .\" @(#)term.5 1.5  .\" @(#)sbrk.2 1.2 .so /usr/man/u_man/man2/brk.2 .TH SCNHDR 4 .SH NAME scnhdr \- section header for a common object file .SH SYNOPSIS .B #include .SH "DESCRIPTION" Every common object file has a table of section headers to specify the layout of the data within the file. Each section within an object file has its own header. The C structure appears below. .PP .TS l l l l. \f3struct scnhdr\f1 \f3{\f1 \& \f3char s_name[\s-1SYMNMLEN\s+1];\f1 /\(** section name \(**/ \& \f3long s_paddr;\f1 /\(** physical address \(**/ \& \f3long s_vaddr;\f1 /\(** virtual address \(**/ \& \f3long s_size;\f1 /\(** section size \(**/ \& \f3long s_scnptr;\f1 /\(** file ptr to raw data \(**/ \& \f3long s_relptr;\f1 /\(** file ptr to relocation \(**/ \& \f3long s_lnnoptr;\f1 /\(** file ptr to line numbers \(**/ \& \f3unsigned short s_nreloc;\f1 /\(** # reloc entries \(**/ \& \f3unsigned short s_nlnno;\f1 /\(** # line number entries \(**/ \& \f3long s_flags;\f1 /\(** flags \(**/ \f3} ;\f1 .TE .PP File pointers are byte offsets into the file; they can be used as the offset .\" @(#)termcap.5 1.8 .tr || .TH TERMCAP 5 .UC 4 .SH NAME termcap \- terminal capability data base .SH SYNOPSIS /etc/termcap .SH DESCRIPTION .I Termcap is a data base which describes terminals. Each entry in the file gives a set of capabilities for a terminal and describes how operations are performed. Padding requirements and initialization sequences are included in .IR termcap . The data base is used by programs such as \fIvi\fR(1). .PP Entries in .I termcap consist of a number of `:' separated fields. The first entry for each terminal gives the names which are known for the terminal, separated by `|' characters. The first name is always 2 characters long and is used by older systems which store the terminal type in a 16-bit word in a systemwide data base. The second name is the most common abbreviation for the terminal and the last name should be a long name fully identifying the terminal. The second name should contain no blanks; the last name may well contain blanks for readability. .br .sp .B Preparin.tr ~ .TH SEMCTL 2 .SH NAME semctl \- semaphore control operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int semctl (" "semid, semnum, cmd, arg" ")" .BR int " semid, cmd" ; .BR int " semnum" ; .B union semun { .B ~~~~~int val; .B ~~~~~struct semid_ds \(**buf; .B ~~~~~ushort array[ ]; .B } arg; .fi .tr ~~ .SH DESCRIPTION .I Semctl provides a variety of semaphore control operations as specified by .IR cmd . .PP The following .IR cmd s are executed with respect to the semaphore specified by .IR semid " and " semnum (see \fIintro\fP(2) for definitions of values and permissions): .RS .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETVAL Return the value of \fIsemval\fP.\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B SETVAL Set the value of \fIsemval\fP to .IR arg.val .\^\^\s-1{ALTER}\s+1 When this \fIcmd\fP is successfully executed, the semadj value (see \fIexit\fP(2)) corresponding to the specified semaphore in all processes is cleared. .TP \w'\ in a call to .IR fseek (3S). If a section is initialized, the file contains the actual bytes. An uninitialized section is somewhat different. It has a size, symbols defined in it, and symbols that refer to it, but it can have no relocation entries, line numbers, or data. Consequently, an uninitialized section has no raw data in the object file, and the values for .IR s_scnptr ", " s_relptr ", " s_lnnoptr , .IR s_nreloc ", and " s_nlnno are zero. .SH "SEE ALSO" \*pld(1), fseek(3S), \*pa.out(4). '\" \%W\% .\" @(#)scnhdr.4 1.6 g Descriptions .PP The most effective way to prepare a terminal description is to imitate the description of a similar terminal in .I termcap and build up a description gradually, using partial descriptions with .I ex to check that they are correct. Be aware that a very unusual terminal may expose deficiencies in the ability of the .I termcap file to describe it or bugs in .I ex. To easily test a new terminal description, set the environment variable TERMCAP to a pathname of a file containing the description being worked on; the editor will look there rather than in .B /etc/termcap. TERMCAP can also be set to the \fItermcap\fR entry itself to avoid reading the file when starting up the editor. .br .sp .B Similar Terminals .PP If there are two very similar terminals, one can be defined as being just like the other with certain exceptions. The string capability \fBtc\fR can be given with the name of the similar terminal. This capability must be \fIlast\fP and the combined length of the two entries must not excefBIPC_RMID\fP\ \ \ 'u .SM .B GETPID Return the value of \fIsempid\fP.\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETNCNT Return the value of \fIsemncnt\fP.\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETZCNT Return the value of \fIsemzcnt\fP.\^\^\s-1{READ}\s+1 .RE .PP The following .IR cmd s return and set, respectively, every \fIsemval\fP in the set of semaphores. .RS .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETALL Place \fIsemval\fPs into array pointed to by .IR arg.array .\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B SETALL Set \fIsemval\fPs according to the array pointed to by .IR arg.array .\^\^\s-1{ALTER}\s+1 When this \fIcmd\fP is successfully executed, the semadj values corresponding to each specified semaphore in all processes are cleared. .RE .PP The following .IR cmd s are also available: .RS .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B IPC_STAT Place the current value of each member of the data structure associated with .I semid into the structure pointed to by .IR arg.buf . T.TH SYMS 4 .SH NAME syms \- common object file symbol table format .SH SYNOPSIS .B #include .SH DESCRIPTION Common object files contain information to support .I symbolic software testing (see .IR sdb (1). Line number entries, .IR linenum (4), and extensive symbolic information permit testing at the C .I source level. Every object file's symbol table is organized as shown below. .PP .RS 10 .nf Filename 1. Function 1. Local symbols for function 1. Function 2 Local symbols for function 2. ... Static externs for file 1. Filename 2. Function 1. Local symbols for function 1. Function 2. Local symbols for function 2. ... Static externs for file 2. \&... Defined global symbols. Undefined global symbols. .fi .RE .PP The entry for a symbol is a fixed-length structure. The members of the structure hold the name (null padded), its value, and other information. The C structure is given below. .PP .TS l l l l. \f3#define \s-1SYMNMLEN\s+1 8\f1 \f3#define \s-1FILNMLEN\s+1 14\f1 \f3struct sym ed 1024. Since .I termlib routines search the entry from left to right, and since the tc capability is replaced by the corresponding entry, the capabilities given at the left override the ones in the similar terminal. A capability can be cancelled with \fBxx@\fR where xx is the capability. For example, the entry .PP hn\||\|2621nl:ks@:ke@:tc=2621: .PP defines a 2621nl that does not have the \fBks\fR or \fBke\fR capabilities, and hence does not turn on the function key labels when in visual mode. This is useful for different modes for a terminal, or for different user preferences. .SH CAPABILITIES Capabilities in .I termcap are of three types: Boolean capabilities, which indicate that the terminal has some particular feature; numeric capabilities, which give the size of the terminal or the size of particular delays; and string capabilities, which give a sequence that can be used to perform particular terminal operations. .PP Entries may be continued onto multiple lines by giving a \e as the last character of ahe contents of this structure are defined in .IR intro (2).\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B IPC_SET Set the value of the following members of the data structure associated with .I semid to the corresponding value found in the structure pointed to by .IR arg.buf : .SP 1v .RS .nf .B sem_perm.uid .B sem_perm.gid .B "sem_perm.mode /\(** only low 9 bits \(**/" .fi .RE .IP This \fIcmd\fP can only be executed by a process that has an effective user .SM ID equal to either that of superuser or to the value of .I sem_perm.uid in the data structure associated with .IR semid . .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B IPC_RMID Remove the semaphore identifier specified by .I semid from the system and destroy the set of semaphores and data structure associated with it. This \fIcmd\fP can only be executed by a process that has an effective user .SM ID equal to either that of superuser or to the value of .I sem_perm.uid in the data structure associated with .IR semid . .PP .I Semctl fails if one or more of ent\f1 \f3{\f1 \f3union\f1 /\(** ways to get a symbol name\(**/ \f3{\f1 \& \f3char _n_name[\s-1SYMNMLEN\s+1] ;\f1 /\(** names less than 8 chars. \(**/ \& \f3struct\f1 /\(** names 8 char or more\(**/ \& \f3{\f1 \& \f3long _n_zeroes;\f1 /\(** == 0L when in string table\(**/ \& \f3long _n_offset;\f1 /\(** location of name in table \(**/ \& \f3} n_n;\f1 \& \f3char \(**_n_nptr[2];\f1 /\(** allows overlaying \(**/ \f3} _n;\f1 \& \f3long n_value ;\f1 /\(** value of symbol \(**/ \& \f3short n_scnum ;\f1 /\(** section number \(**/ \& \f3unsigned short n_type ;\f1 /\(** type and derived type \(**/ \& \f3char n_sclass ;\f1 /\(** storage class \(**/ \& \f3char n_numaux ;\f1 /\(** number of aux entries \(**/ \f3} ;\f1 \f3#define n_name _n._n_name\f1 \f3#define n_zeroes _n._n_n._n_zeroes\f1 \f3#define n_offset _n._n_n._n_offset\f1 \f3#define n_nptr _n._n_nptr[1]\f1 .TE .PP Meaningful values and explanations for them are given in both .B syms.h .RI and " Common Object File Format" . Anyone who needs to  line. Empty fields may be included for readability (e.g., between the last field on a line and the first field on the next). .PP .B List of Capabilities .PP .nf (P) indicates padding may be specified (P*) indicates that padding may be based on no. lines affected .ta \w'k0-k9 'u +\w'Type 'u +\w'Pad? 'u \fBName Type Pad? Description\fR ae str (P) End alternate character set al str (P*) Add new blank line am bool Terminal has automatic margins as str (P) Start alternate character set bc str Backspace character, if not \fB^H\fR bs bool Terminal can backspace with \fB^H\fR bt str (P) Back tab bw bool Backspace wraps from column 0 to last column CC str Command character in prototype if terminal settable cd str (P*) Clear to end of display ce str (P) Clear to end of line ch str (P) Like cm but horizontal motion only, line stays same cl str (P*) Clear screen cm str (P) Cursor motion co num Number of columns in a line cr str (P*) Carriage return, (default \fB^M\fR) cs str (P) Change scrolling region (vt100) the following are true: .IP .I Semid is not a valid semaphore identifier. .SM \%[EINVAL] .IP .I Semnum is less than zero or greater than .IR sem_nsems . .SM \%[EINVAL] .IP .I Cmd is not a valid command. .SM \%[EINVAL] .IP Operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP .I Cmd is .SM .B SETVAL or .SM .B SETALL and the value to which \fIsemval\fP is to be set is greater than the system imposed maximum. .SM \%[ERANGE] .IP .I Cmd is equal to .SM .B IPC_RMID or .SM .B IPC_SET and the effective user .SM ID of the calling process is not equal to that of superuser and is not equal to the value of .I sem_perm.uid in the data structure associated with .IR semid . .SM \%[EPERM] .IP .I Arg.buf points to an illegal address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, the value returned depends on .I cmd\^ as follows: .PD 0 .RS .TP 1.5i .SM .B GETVAL The value of \fIsemval\fP. .TP .SM .B GETPID The value of \fIsempid\fP. .TP .SM .B GETNCNT The value of \fIsemninterpret the entries should seek more information in these sources. Some symbols require more information than a single entry; they are followed by .I "auxiliary entries" that are the same size as a symbol entry. The format follows. .PP .if t .RS .ta \w'struct\ 'u +\w'struct\ 'u +\w'unsigne'u +\w'd\ short\ \ 'u +\w'unsigne'u +\w'd\ short\ \ 'u .nf .lg 0 .ne 26 \f3union auxent\f1 \f3{\f1 \f3struct\f1 \f3{\f1 \f3long x_tagndx;\f1 \f3union\f1 \f3{\f1 \f3struct\f1 \f3{\f1 \f3unsigned short  x_lnno;\f1 \f3unsigned short x_size;\f1 \f3} x_lnsz;\f1 \f3long x_fsize;\f1 \f3} x_misc;\f1 \f3union\f1 \f3{\f1 \f3struct\f1 \f3{\f1 \f3long x_lnnoptr;\f1 \f3long x_endndx;\f1 \f3} x_fcn;\f1 \f3struct\f1  \f3{\f1 \f3unsigned short x_dimen[\s-1DIMNUM\s+1];\f1 \f3} x_ary;\f1 \f3} x_fcnary;\f1 \f3unsigned short x_tvndx;\f1 \f3} x_sym;\f1 \f3struct\f1 \f3{\f1 \f3char x_fname[\s-1FILNMLEN\s+1];\f1 \f3} x_file;\f1 \f3struct\f1 , like cm cv str (P) Like ch but vertical only. da bool Display may be retained above dB num Number of millisec of bs delay needed db bool Display may be retained below dC num Number of millisec of cr delay needed dc str (P*) Delete character dF num Number of millisec of ff delay needed dl str (P*) Delete line dm str Delete mode (enter) dN num Number of millisec of nl delay needed do str Down one line dT num Number of millisec of tab delay needed ed str End delete mode ei str End insert mode; give \*(lq:ei=:\*(rq if \fBic\fR eo str Can erase overstrikes with a blank ff str (P*) Hardcopy terminal page eject (default \fB^L\fR) hc bool Hardcopy terminal hd str Half-line down (forward 1/2 linefeed) ho str Home cursor (if no \fBcm\fR) hu str Half-line up (reverse 1/2 linefeed) hz str Hazeltine; can't print ~'s ic str (P) Insert character if str Name of file containing \fBis\fR im bool Insert mode (enter); give \*(lq:im=:\*(rq if \fBic\fR in bool Insert mode distinguishes nulls on display ip strcnt\fP. .TP .SM .B GETZCNT The value of \fIsemzcnt\fP. .TP All others A value of 0. .RE .PP .PD When \fIsemctl\fP is unsuccessful, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO semget(2), semop(2), intro(2), exit(2). .\" @(#)semctl.2 1.5   \f3{\f1 \f3long x_scnlen;\f1 \f3unsigned short x_nreloc;\f1 \f3unsigned short x_nlinno;\f1 \f3} x_scn;\f1 \f3struct\f1 \f3{\f1 \f3unsigned short x_tvlen;\f1 \f3unsigned short x_tvran[2];\f1 \f3} x_tv;\f1 \f3};\f1 .fi .lg .if t .RE .PP Indexes of symbol table entries begin at .IR zero . .SH "SEE ALSO" \*psdb(1), \*pa.out(4), linenum(4). .br .I Common Object File Format by I. S. Law. .SH WARNING In machines in which longs are equivalent to ints (M68000 and VAX), the longs are converted to ints in the compiler to minimize the complexity of the compiler code generator. Thus, the information about which symbols are declared as longs and which as ints cannot be determined from the symbol table. '\" \%W\% .\" @(#)syms.4 1.6  (P*) Insert pad after character inserted is str Terminal initialization string k0-k9 str Sent by \*(lqother\*(rq function keys 0-9 kb str Sent by backspace key kd str Sent by terminal down arrow key ke str Out of \*(lqkeypad transmit\*(rq mode kh str Sent by home key kl str Sent by terminal left arrow key kn num Number of \*(lqother\*(rq keys ko str Termcap entries for other non-function keys kr str Sent by terminal right arrow key ks str Put terminal in \*(lqkeypad transmit\*(rq mode ku str Sent by terminal up arrow key l0-l9 str Labels on \*(lqother\*(rq function keys li num Number of lines on screen or page ll str Last line, first column (if no \fBcm\fR) ma str Arrow key map, used by vi version 2 only mi bool Safe to move while in insert mode ml str Memory lock on above cursor. ms bool Safe to move while in standout and underline mode mu str Memory unlock (turn off memory lock). nc bool No correctly working carriage return (DM2500,H2000) nd str Non-destructive space (cursor right) nl.TH SEMGET 2 .SH NAME semget \- get set of semaphores .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int semget (" "key, nsems, semflg" ) .BR key_t " key" ; .BR int " nsems, semflg" ; .fi .SH DESCRIPTION .I Semget returns the semaphore identifier associated with .IR key . .PP A semaphore identifier and associated data structure and set containing .I nsems semaphores (see .IR intro (2)) are created for .I key if one of the following is true: .IP .I Key is equal to .SM .BR IPC_PRIVATE . .IP .I Key does not already have a semaphore identifier associated with it, and .RI ( semflg " & " .SM .BR IPC_CREAT\*S ) is ``true''. .PP Upon creation, the data structure associated with the new semaphore identifier is initialized as follows: .IP .IR Sem_perm.cuid ", " sem_perm.uid , .IR sem_perm.cgid ", and " sem_perm.gid are set equal to the effective user .SM ID and effective group .SM ID\*S, respectively, of the calling process. .IP The low-order 9 bits of .I sem'\" t .TH SYSTEM 4 "3B20S only" .SH NAME system \- format of 3B20S system description file .SH DESCRIPTION This file contains information about the hardware configuration and system-dependent parameters for the user's system. A more complete description of the system file is found in Setting up the \s-1UNIX\s+1 System in the .IR "U\s-1NIX\s+1 System Administrator's Guide" . This information is used by the \fIconfig\fP(1M) program in configuring systems. The file is divided into two sections, separated by a line with a dollar sign .RB ( $ ) in column 1. The first section describes the hardware configuration and the second contains system-dependent information. Any lines with a number sign .RB ( # ) in column 1 are treated as comments and are ignored. Blank lines are also ignored. All fields may be separated by one or more space and tab characters. .PP The following codes are used throughout the following description: .PP .RS .TS lI lI l l. Name Meaning chan channel count number of disk blocks in swap or dump a   str (P*) Newline character (default \fB\en\fR) ns bool Terminal is a \s-2CRT\s+2 but doesn't scroll. os bool Terminal overstrikes pc str Pad character (rather than null) pt bool Has hardware tabs (may need to be set with \fBis\fR) se str End stand out mode sf str (P) Scroll forwards sg num Number of blank chars left by so or se so str Begin stand out mode sr str (P) Scroll reverse (backwards) ta str (P) Tab (other than \fB^I\fR or with padding) tc str Entry of similar terminal - must be last te str String to end programs that use \fBcm\fP ti str String to begin programs that use \fBcm\fR uc str Underscore one char and move past it ue str End underscore mode ug num Number of blank chars left by us or ue ul bool Terminal underlines even though it doesn't overstrike up str Upline (cursor up) us str Start underscore mode vb str Visible bell (may not move cursor) ve str Sequence to end open/visual mode vs str Sequence to start open/visual mode xb bool Beehive (f1=escape, f2=ctrl C) xn bool A _perm.mode are set equal to the low-order 9 bits of .IR semflg . .IP .I Sem_nsems is set equal to the value of .IR nsems . .IP .I Sem_otime is set equal to 0 and .I sem_ctime is set equal to the current time. .PP .I Semget fails if one or more of the following are true: .IP .I Nsems is either less than or equal to zero or greater than the system imposed limit. .SM \%[EINVAL] .IP A semaphore identifier exists for .I key but operation permission (see .IR intro (2)), as specified by the low-order 9 bits of .IR semflg , would not be granted. .SM \%[EACCES] .IP A semaphore identifier exists for .I key but the number of semaphores in the set associated with it is less than .IR nsems " and " nsems is not equal to zero. .SM \%[EINVAL] .IP A semaphore identifier does not exist for .I key and .RI ( semflg " &" .SM .BR IPC_CREAT\*S ) is ``false''. .SM \%[ENOENT] .IP A semaphore identifier is to be created but the system imposed limit on the maximum number of allowed semaphores system wide would be exceeded. .SM \%[ENOSrea dev device on a channel devname name of device driver name of a software device driver equip equipage hv hardware version inter interrupt source bit low lowest disk block in swap or dump area minor minor device number mt maintenance type mv maintenance version num the number of instances of a software device driver parm name of a \s-1UNIX\s+1 System parameter pc name of device driver for a \s-1PC\s+1 pumpcode path name of pump code file slot slot number of a sub-device on its device unit logical unit number of a device value value of a \s-1UNIX\s+1 System parameter .TE .RE .SS "Hardware Configuration" This section describes the configuration of the Control Unit (\s-1CU\s+1) and its components, the Disk File Controllers (\s-1DFC\s+1s) and their Moving Head Disks (\s-1MHD\s+1s), and the Input Output Processors (\s-1IOP\s+1s) and their Peripheral Controllers (\s-1PC\s+1s). Any line that describes an \s-1IOP\s+1, \s-1DFC\s+1, \s-1MHD\s+1 or \s-1PC\s+1 may optionally have an exclamation point .RB ( ! ) precedinewline is ignored after a wrap (Concept) xr bool Return acts like \fBce\fP \er \en (Delta Data) xs bool Standout not erased by writing over it (HP 264?) xt bool Tabs are destructive, magic so char (Teleray 1061) .fi .PP .B A Sample Entry .PP The following entry, which describes the Concept\-100, is among the more complex entries in the .I termcap file as of this writing. (This particular concept entry is outdated, and is used as an example only.) .PP .nf c1\||\|c100\||\|concept100:is=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e200\eEo&\e200:\e :al=3*\eE^R:am:bs:cd=16*\eE^C:ce=16\eE^S:cl=2*^L:cm=\eEa%+ %+ :co#80:\e :dc=16\eE^A:dl=3*\eE^B:ei=\eE\e200:eo:im=\eE^P:in:ip=16*:li#24:mi:nd=\eE=:\e :se=\eEd\eEe:so=\eED\eEE:ta=8\et:ul:up=\eE;:vb=\eEk\eEK:xn: .fi .PP .B Capability Descriptions .PP All capabilities have 2-letter codes. For instance, the fact that the Concept-100 has \*(lqautomatic margins\*(rq (i.e., an automatic return and linefeed when the end of a line is reached) is indicated b  PC] .IP A semaphore identifier exists for .I key but .RI "( (" semflg " & " .SM .BR IPC_CREAT\*S ") & (" .IR semflg " & " .SM .BR IPC_EXCL\*S ") )" is ``true''. .SM \%[EEXIST] .br .if \n()s .bp .SH "RETURN VALUE" Upon successful completion, a non-negative integer (i.e., a semaphore identifier) is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO semctl(2), semop(2). .\" @(#)semget.2 1.7 ng the first field. This indicates that a device should not automatically be brought into service by the system (see .IR don (1M)). Note that an exclamation point which precedes an \s-1IOP\s+1 implies that neither the \s-1IOP\s+1 nor its \s-1PC\s+1s will be brought into service. The same applies to a \s-1DFC\s+1 and its \s-1MHD\s+1s. .PP The \s-1CU\s+1 and its components are specified as follows: .PP .RS .TS lB lB l l l l l l l. cu \fRunit\fP chan dev mt mv hv cc unit mt mv hv equip 0 masc unit mt mv hv equip 0 sat unit mt mv hv equip 0 ch unit mt mv hv equip 0 ch unit mt mv hv equip 0 csu unit mt mv hv equip 0 dma unit mt mv hv equip 0 \fBch\fP unit mt mv hv equip inter .TE .RE .PP Each \s-1DFC\s+1 and its \s-1MHD\s+1s are specified as follows: .PP .RS .TS lB lB l l l l l l l. dfc \fRunit\fP chan dev mt mv hv equip mhd unit slot mt mv hv equip .TE .RE .PP Each \s-1IOP\s+1 and its \s-1PC\s+1s are specified as follows: .PP .RS .TS lB l l l l l l l l. iop unit chan dev mt mv hv equip pc unit slot mty the capability \fBam\fR in the sample description above. Numeric capabilities are followed by the character `#' and then the value. Thus, \fBco\fR, which indicates the number of columns the terminal has, gives the value `80' for the Concept-100. .PP String-valued capabilities, such as \fBce\fR (clear to end of line sequence), are given by the 2-character code, an `=', and a string ending at the next field separator (:). A delay in milliseconds may appear after the `=' in such a capability and padding characters are supplied by the editor after the remainder of the string is sent to provide this delay. The delay can be either an integer, e.g., `20', or an integer followed by an `*', i.e., `3*'. An `*' indicates that the padding required is proportional to the number of lines affected by the operation, and the amount given is the per-affected-unit padding required. When an `*' is specified, it is sometimes useful to give a delay of the form `3.5' to specify a delay per unit to tenths of milliseconds. .PP A .TH SEMOP 2 .SH NAME semop \- semaphore operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int semop (" "semid, sops, nsops" ) .BR int " semid" ; .BR "struct sembuf (\(**" sops )[]; .BR int " nsops" ; .fi .SH DESCRIPTION .I Semop is used to atomically perform an array of semaphore operations on the set of semaphores associated with the semaphore identifier specified by .IR semid . .I Sops is a pointer to the array of semaphore-operation structures. .I Nsops is the number of such structures in the array. Each structure includes the following members: .PP .RS .ta 8n 20n .nf \f3short\f2 sem_num\f3;\f1 /\(** semaphore number \(**/ \f3short\f2 sem_op\f3;\f1 /\(** semaphore operation \(**/ \f3short\f2 sem_flg\f3;\f1 /\(** operation flags \(**/ .fi .RE .PP Each semaphore operation specified by .I sem_op is performed on the corresponding semaphore specified by .IR semid " and " sem_num . .PP .I Sem_op specifies one of three semaphore operations as fo!  mv hv equip [pumpcode] .TE .RE .SS "System-Dependent Information" This section specifies \s-1UNIX\s+1 System devices, \s-1UNIX\s+1 System parameters and software drivers. .PP The root and pipe devices are specified by: .PP .RS .TS lfB l l. root devname minor pipe devname minor .TE .RE .PP The swap and dump devices are specified by: .PP .RS .TS lfB l l l l. swap devname minor low count dump devname minor low count .TE .RE .PP Tunable parameters are specified by: .PP .RS .TS l l. parm value .TE .RE .PP Software drivers are specified in one of two forms: .PP .RS .TS l l. driver num driver .TE .RE .PP .SH "SEE ALSO" config(1M), don(1M), master(4). .br Setting up the \s-1UNIX\s+1 System in the .IR "U\s-1NIX\s+1 System Administrator's Guide" . .\" @(#)system.4 1.1 number of escape sequences are provided in the string-valued capabilities for easy encoding of characters there. A \fB\eE\fR maps to an \s-2ESCAPE\s0 character, \fB^x\fR maps to a control-x for any appropriate x, and the sequences \fB\en \er \et \eb \ef\fR give a newline, return, tab, backspace and formfeed. Finally, characters may be given as 3 octal digits after a \fB\e\fR, and the characters \fB^\fR and \fB\e\fR may be given as \fB\e^\fR and \fB\e\e\fR. If it is necessary to place a colon (\fB:\fR) in a capability, it must be escaped in octal as \fB\e072\fR. If it is necessary to place a null character in a string capability, it must be encoded as \fB\e200\fR. The routines which deal with .I termcap use C strings, and strip the high bits of the output very late; therefore, a \fB\e200\fR comes out as a \fB\e000\fR would. .br .ne 5 .PP .PP .B Basic capabilities .PP The number of columns on each line for the terminal is given by the \fBco\fR numeric capability. If the terminal is a \s-2CRT\s0, then the numllows (see semaphore data structure in .IR intro (2)): .PP .RS 8 If .I sem_op is a negative integer, one of the following occurs: .SM \%{ALTER} .IP If \fIsemval\fP is greater than or equal to the absolute value of .IR sem_op , the absolute value of .I sem_op is subtracted from \fIsemval\fP. Also, if .RI ( sem_flg " &" .SM .BR SEM_UNDO\*S ) is ``true'', the absolute value of .I sem_op is added to the calling process's semadj value (see .IR exit (2)) for the specified semaphore. .IP If \fIsemval\fP is less than the absolute value of .I sem_op and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``true'', .I semop returns immediately. .IP If \fIsemval\fP is less than the absolute value of .I sem_op and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``false'', .I semop increments the \fIsemncnt\fP associated with the specified semaphore and suspends execution of the calling process until one of the following occurs: .RS 8 .PP \fISemval\fP becomes greater than or equal to the absolute value of .IR sem_op . When this '\" t .TH UTMP 4 .SH NAME utmp, wtmp \- utmp and wtmp entry formats .SH SYNOPSIS .B #include .br .B #include .SH DESCRIPTION These files hold user and accounting information for commands such as .IR who (1), .IR write (1), and .IR login (1). They have the following structure, as defined by .BR : .br .ne 4v .PP .nf .TS l lp-1 l. \f3#define UTMP_FILE "/etc/utmp"\f1 \f3#define WTMP_FILE "/etc/wtmp"\f1 .T& l l l. \f3#define ut_name ut_user\f1 .TE .sp 1v .br .ne 14v .TS l1 l1 l1 l. .tr ~ \f3struct utmp {\f1 \f3char ut_user[8];\f1 ~/\(** user login name \(**/ \f3char ut_id[4];\f1 ~/\(** /etc/inittab id (usually line #) \(**/ \f3char ut_line[12];\f1 ~/\(** device name (console, lnxx) \(**/ \f3short ut_pid;\f1 ~/\(** process id \(**/ \f3short ut_type;\f1 ~/\(** type of entry \(**/ \f3struct exit_status {\f1 \f3~~~~short ~~~~e_termination;\f1 ~/\(** process termination status \(**/ \f3~~~~short ~~~~e_exit;\f1 ~/\(** process exit status \(**/ \f3} ut_exit;\f1 ~/\(** the exit s!  "%(+.147occurs, the value of \fIsemncnt\fP associated with the specified semaphore is decremented, the absolute value of .I sem_op is subtracted from \fIsemval\fP and, if .RI ( sem_flg " &" .SM .BR SEM_UNDO\*S ) is ``true'', the absolute value of .I sem_op is added to the calling process's semadj value for the specified semaphore. .PP The \fIsemid\fP for which the calling process is awaiting action is removed from the system (see .IR semctl (2)). When this occurs, .I errno is set equal to .SM EIDRM\*S and a value of \-1 is returned. .PP The calling process receives a signal that is to be caught. When this occurs, the value of \fIsemncnt\fP associated with the specified semaphore is decremented and the calling process resumes execution in the manner prescribed in .IR signal (2). .RE .PP If .I sem_op is a positive integer, the value of .I sem_op is added to \fIsemval\fP and, if .RI ( sem_flg " &" .SM .BR SEM_UNDO\*S ) is ``true'', the value of .I sem_op is subtracted from the calling process's semadj value for the spectatus of a process ~\(** marked as \s-1DEAD_PROCESS\s+1. \(**/ \f3time_t ut_time;\f1 ~/\(** time entry was made \(**/ \f3};\f1 .tr ~~ .TE .sp 1v .br .ne 15v /\(** Definitions for ut_type \(**/ .TS l1 l1p-1 l1 l. \f3#define EMPTY 0\f1 \f3#define RUN_LVL 1\f1 \f3#define BOOT_TIME 2\f1 \f3#define OLD_TIME 3\f1 \f3#define NEW_TIME 4\f1 \f3#define INIT_PROCESS 5\f1 /\(** process spawned by \f2init\f1 \(**/ \f3#define LOGIN_PROCESS 6\f1 /\(** a \f2getty\f1 process waiting for login \(**/ \f3#define USER_PROCESS 7\f1 /\(** a user process \(**/ \f3#define DEAD_PROCESS 8\f1 \f3#define ACCOUNTING 9\f1 \f3#define UTMAXTYPE \s-1ACCOUNTING\s+1\f1 /\(** Largest legal value of ut_type \(**/ .TE .sp 1v .br .ne 9v /\(** Special strings or formats used in the ut_line field when \(**/ /\(** accounting for something other than a process. \(**/ /\(** No string for the ut_line field can be more than 11 chars + \(**/ /\(** a \s-1NULL\s+1 in length. \(**/ .TS l1 l1p-1 l. \f3#define RUNLVL_MSG "run\-levber of lines on the screen is given by the \fBli\fR capability. If the terminal wraps around to the beginning of the next line when it reaches the right margin, its description should include the \fBam\fR capability. If the terminal can clear its screen, this is given by the \fBcl\fR string capability. If the terminal can backspace, it should have the \fBbs\fR capability, unless a backspace is accomplished by a character other than \fB^H\fR, in which case the alternate character should be given as the \fBbc\fR string capability. If it overstrikes (rather than clearing a position when a character is struck over), it should have the \fBos\fR capability. .PP A very important point is that the local cursor motions encoded in .I termcap are undefined at the left and top edges of a \s-2CRT\s0 terminal. The editor will never attempt to backspace around the left edge, nor will it attempt to go up locally off the top. The editor assumes that feeding off the bottom of the screen will cause the screen to scroll up, a" ified semaphore. .SM \%{ALTER} .PP If .I sem_op is zero, one of the following occurs: .SM \%{READ} .IP If \fIsemval\fP is zero, .I semop returns immediately. .IP If \fIsemval\fP is not equal to zero and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``true'', .I semop returns immediately. .IP If \fIsemval\fP is not equal to zero and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``false'', .I semop increments the \fIsemzcnt\fP associated with the specified semaphore and suspends execution of the calling process until one of the following occurs: .RS 8 .PP \fISemval\fP becomes zero, at which time the value of \fIsemzcnt\fP associated with the specified semaphore is decremented. .PP The \fIsemid\fP for which the calling process is awaiting action is removed from the system. When this occurs, .I errno is set equal to .SM EIDRM\*S and a value of \-1 is returned. .PP The calling process receives a signal that is to be caught. When this occurs, the value of \fIsemzcnt\fP associated with the specified semaphore is decel %c"\f1 \f3#define BOOT_MSG "system boot"\f1 \f3#define OTIME_MSG "old time"\f1 \f3#define NTIME_MSG "new time"\f1 .TE .fi .bp .SH FILES /usr/include/utmp.h .br /etc/utmp .br /etc/wtmp .SH SEE ALSO login(1), who(1), write(1), getut(3C). .\" @(#)utmp.4 1.7 nd the \fBam\fR capability tells whether the cursor sticks at the right edge of the screen. If the terminal has switch-selectable automatic margins, the .I termcap file usually assumes that this is on, i.e., \fBam\fR. .PP These capabilities suffice to describe hardcopy and \*(lqglass-tty\*(rq terminals. Thus, the model 33 teletype is described as .PP .DT t3\||\|33\||\|tty33:co#72:os .PP while the Lear Siegler \s-2ADM\-3\s0 is described as .PP .DT cl\||\|adm3|3|lsi adm3:am:bs:cl=^Z:li#24:co#80 .PP .B Cursor addressing .PP Cursor addressing in the terminal is described by the \fBcm\fR string capability. It uses escapes like those in .IR printf (3s), i.e., \fB%x\fR. These substitute to encodings of the current line or column position, while other characters are passed through unchanged. If the \fBcm\fR string is thought of as being a function, then its arguments are the line and column to which motion is desired. The \fB%\fR encodings have the following meanings: .PP .DT .nf %d as in \fIprintf\fR, 0 origin remented and the calling process resumes execution in the manner prescribed in .IR signal (2). .RE .RE .PP .I Semop fails if one or more of the following are true for any of the semaphore operations specified by .IR sops : .IP .I Semid is not a valid semaphore identifier. .SM \%[EINVAL] .IP .I Sem_num is less than zero or greater than or equal to the number of semaphores in the set associated with .IR semid . .SM \%[EFBIG] .IP .I Nsops is greater than the system imposed maximum. .SM \%[E2BIG] .IP Operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP The operation would result in suspension of the calling process but .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``true''. .SM \%[EAGAIN] .IP The limit on the number of individual processes requesting a .SM .B SEM_UNDO would be exceeded. .SM \%[ENOSPC] .IP The number of individual semaphores for which the calling process requests a .SM .B SEM_UNDO would exceed the limit. .SM \%[EINVAL] .IP An operation would cause a \fIsem" .\" @(#)wtmp.4 1.2 .so /usr/man/u_man/man4/utmp.4 %2 like %2d %3 like %3d %. like %c %+x adds \fIx\fR to value, then %. %>xy if value > x adds y, no output. %r reverses order of line and column, no output %i increments line/column (for 1 origin) %% gives a single % %n exclusive or row and column with 0140 (DM2500) %B BCD (16*(x/10)) + (x%10), no output. %D Reverse coding (x-2*(x%16)), no output. (Delta Data). .fi .PP For example, to get to row 3 and column 12 the HP2645 needs to be sent \eE&a12c03Y padded for 6 milliseconds. Note that the order of the rows and columns is inverted here, and that the row and column are printed as 2 digits. Thus, its \fBcm\fR capability is \*(lqcm=6\eE&%r%2c%2Y\*(rq. The Microterm \s-2ACT-IV\s0 needs the current row and column sent, preceded by a \fB^T\fR, with the row and column simply encoded in binary, \*(lqcm=^T%.%.\*(rq. Terminals which use \*(lq%.\*(rq need to be able to backspace the cursor (\fBbs\fR or \fBbc\fR), and to move the cursor up one line on the screen (\fBup\fR is introduced below). This is necessval\fP to overflow the system imposed limit. .SM \%[ERANGE] .IP An operation would cause a semadj value to overflow the system imposed limit. .SM \%[ERANGE] .IP .I Sops points to an illegal address. .SM \%[EFAULT] .PP Upon successful completion, the value of \fIsempid\fP for each semaphore specified in the array pointed to by .I sops is set equal to the process .SM ID of the calling process. .SH RETURN VALUE .RI If " semop returns due to the receipt of a signal, a value of \-1 is returned to the calling process and .I errno is set to .SM \%EINTR\*S. If it returns due to the removal of a .I semid from the system, a value of \-1 is returned and .I errno is set to .SM \%EIDRM\*S. .PP Upon successful completion, the value of \fIsemval\fP at the time of the call for the last operation in the array pointed to by .I sops is returned. Otherwise, a value of \-1 is returned and .I errno is set to indicate the error. .SH SEE ALSO intro(2), exec(2), exit(2), fork(2), semctl(2), semget(2). .\" @(#)semop.2 1.5 r...sascii.5tenviron.5ueqnchar.5vfcntl.5wgreek.5xintro.5yman.5zmm.5{mosd.5|mptx.5}mv.5~regexp.5stat.5term.5termcap.5types.5# ary because it is not always safe to transmit \fB\et\fR, \fB\en\fR \fB^D\fR and \fB\er\fR, because the system may change or discard them. .PP A final example is the \s-2LSI ADM\s0-3a, which uses row and column offset by a blank character; thus, \*(lqcm=\eE=%+ %+ \*(rq. .PP .B Cursor motions .PP If the terminal can move the cursor one position to the right, leaving the character at the current position unchanged, this sequence should be given as \fBnd\fR (non-destructive space). If it can move the cursor up a line on the screen in the same column, this should be given as \fBup\fR. If the terminal has no cursor addressing capability, but can home the cursor (to the very upper left corner of screen), this can be given as \fBho\fR; similarly, a fast way of getting to the lower left hand corner can be given as \fBll\fR; this may involve moving up with \fBup\fR from the home position, but the editor will never do this itself (unless \fBll\fR does) because it makes no assumption about the effect of moving up from t.\" @(#)setgid.2 1.2 .so /usr/man/u_man/man2/setuid.2 .if t .ds ' \s+4\v@.333m@\'\v@-.333m@\s-4 .if n .ds ' ' .if t .ds ` \s+4\v@.333m@\`\v@-.333m@\s-4 .if n .ds ` ` .TH ASCII 5 .SH NAME ascii \- map of \s-1ASCII\s+1 character set .SH SYNOPSIS .B cat /usr/pub/ascii .SH DESCRIPTION .I Ascii\^ is a map of the .SM ASCII character set, giving both octal and hexadecimal equivalents of each character, to be printed as needed. It contains: .PP .nf .ps -1 .if n .in 0 .if n .ta 9n 18n 27n 36n 45n 54n 63n 72n .if \n()s .ta 9.5n 19n 28.5n 38n 47.5n 57n 66.5n 76n .if \n()t .ta 10n 20n 30n 40n 50n 60n 70n 80n .if t .cs 1 21 .ft 3 |000 nul |001 soh |002 stx |003 etx |004 eot |005 enq |006 ack |007 bel | |010 bs |011 ht |012 nl |013 vt |014 np |015 cr |016 so |017 si | |020 dle |021 dc1 |022 dc2 |023 dc3 |024 dc4 |025 nak |026 syn |027 etb | |030 can |031 e\h@.1m@m |032 sub |033 esc |034 fs |035 gs |036 rs |037 us | |040 sp |041 ! |042 " |043 # |044 $ |045 % |046 & |047 \*' | |050 ( |051 ) |052 * |053 + |054 , |055 \- |056 . |057 / | |060 0 |061 1 |062 2 |063 3 |064 4 |065 5 |he home position. .PP .B Area clears .PP If the terminal can clear from the current position to the end of the line, leaving the cursor where it is, this should be given as \fBce\fR. If the terminal can clear from the current position to the end of the display, then this should be given as \fBcd\fR. The editor only uses \fBcd\fR from the first column of a line. .PP .B Insert/delete line .PP If the terminal can open a new blank line before the line where the cursor is, this should be given as \fBal\fR; this is done only from the first position of a line. The cursor must then appear on the newly blank line. If the terminal can delete the line which the cursor is on, this should be given as \fBdl\fR; this is done only from the first position on the line to be deleted. If the terminal can scroll the screen backwards, this can be given as \fBsb\fR, although just \fBal\fR suffices. If the terminal can retain display memory above, the \fBda\fR capability should be given; if display memory can be retained below, \fB# .TH SETPGRP 2 .SH NAME setpgrp \- set process group \s-1ID\s+1 .SH SYNOPSIS .B int setpgrp (\|) .SH DESCRIPTION .I Setpgrp\^ sets the process group .SM ID of the calling process to the process .SM ID of the calling process and returns the new process group .SM ID\*S. .SH RETURN VALUE .I Setpgrp\^ returns the value of the new process group .SM ID\*S. .SH SEE ALSO exec(2), fork(2), getpid(2), intro(2), kill(2), signal(2). .\" @(#)setpgrp.2 1.2 066 6 |067 7 | |070 8 |071 9 |072 : |073 ; |074 < |075 = |076 > |077 ? | |100 @ |101 A |102 B |103 C |104 D |105 E |106 F |107 G | |110 H |111 I |112 J |113 K |114 L |115 M |116 N |117 O | |120 P |121 Q |122 R |123 S |124 T |125 U |126 V |127 W | |130 X |131 Y |132 Z |133 [ |134 \e |135 ] |136 ^ |137 _ | |140 \*` |141 a |142 b |143 c |144 d |145 e |146 f |147 g | |150 h |151 i |152 j |153 k |154 l |155 m |156 n |157 o | |160 p |161 q |162 r |163 s |164 t |165 u |166 v |167 w | |170 x |171 y |172 z |173 { |174 | |175 } |176 ~ |177 del | .sp 1v |\000 nul |\001 soh |\002 stx |\003 etx |\004 eot |\005 enq |\006 ack |\007 bel | |\008 bs |\009 ht |\00a nl |\00b vt |\00c np |\00d cr |\00e so |\00f si | |\010 dle |\011 dc1 |\012 dc2 |\013 dc3 |\014 dc4 |\015 nak |\016 syn |\017 etb | |\018 can |\019 e\h@.1m@m |\01a sub |\01b esc |\01c fs |\01d gs |\01e rs |\01f us | |\020 sp |\021 ! |\022 " |\023 # |\024 $ |\025 % |\026 & |\027 \*' | |\028 ( |\029 ) |\02a * |\02b + |\02c , |\02d \- |\02e . |\02f / | |\030 0 |\031 1 |db\fR should be given. These capabilities let the editor understand that deleting a line on the screen may bring non-blank lines up from below or that scrolling back with \fBsb\fR may bring down non-blank lines. .PP .B Insert/delete character .PP \fITermcap\fR can be used to describe two basic kinds of intelligent terminals with respect to insert/delete characters. The most common insert/delete character operations affect only the characters on the current line and shift characters off the end of the line rigidly. Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make a distinction between typed and untyped blanks on the screen, shifting upon an insert or delete only to an untyped blank on the screen; the blank is either eliminated or expanded to 2 untyped blanks. You can find out which kind of terminal you have by clearing the screen and then typing text separated by cursor motions. Type \*(lqabc\ \ \ \ def\*(rq using local cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(.TH SETUID 2 .SH NAME setuid, setgid \- set user and group \s-1ID\s+1s .SH SYNOPSIS .BR "int setuid (" uid ) .br .BR int " uid" ; .PP .BR "int setgid (" gid ) .br .BR int " gid" ; .SH DESCRIPTION .IR Setuid " (" setgid ) is used to set the real user (group) .SM ID and effective user (group) .SM ID of the calling process. .PP If the effective user .SM ID of the calling process is superuser, the real user (group) .SM ID and effective user (group) .SM ID are set to .IR uid " (" gid ). .PP If the effective user .SM ID of the calling process is not superuser, but its real user (group) .SM ID is equal to .IR uid " (" gid ), the effective user (group) .SM ID is set to .IR uid " (" gid ). .PP .IR Setuid " (" setgid ) fails if the real user (group) .SM ID of the calling process is not equal to .IR uid " (" gid ) and its effective user .SM ID is not superuser. .SM \%[EPERM] .SH RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the$ \032 2 |\033 3 |\034 4 |\035 5 |\036 6 |\037 7 | |\038 8 |\039 9 |\03a : |\03b ; |\03c < |\03d = |\03e > |\03f ? | |\040 @ |\041 A |\042 B |\043 C |\044 D |\045 E |\046 F |\047 G | |\048 H |\049 I |\04a J |\04b K |\04c L |\04d M |\04e N |\04f O | |\050 P |\051 Q |\052 R |\053 S |\054 T |\055 U |\056 V |\057 W | |\058 X |\059 Y |\05a Z |\05b [ |\05c \e |\05d ] |\05e ^ |\05f _ | |\060 \*` |\061 a |\062 b |\063 c |\064 d |\065 e |\066 f |\067 g | |\068 h |\069 i |\06a j |\06b k |\06c l |\06d m |\06e n |\06f o | |\070 p |\071 q |\072 r |\073 s |\074 t |\075 u |\076 v |\077 w | |\078 x |\079 y |\07a z |\07b { |\07c | |\07d } |\07e ~ |\07f del | .ps .DT .if t .cs 1 .fi .ft .SH FILES /usr/pub/ascii .\" @(#)ascii.5 1.4 lqdef\*(rq. Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert mode. If typing characters causes the rest of the line to shift rigidly and characters to fall off the end, then your terminal does not distinguish between blanks and untyped positions. If the \*(lqabc\*(rq shifts over to the \*(lqdef\*(rq which then move together around the end of the current line and onto the next as you insert, you have the second type of terminal, and should give the capability \fBin\fR, which stands for \*(lqinsert null\*(rq. If your terminal does something different and unusual then you may have to modify the editor to get it to use the insert mode your terminal defines. We have seen no terminals with an insert mode that does not fall into one of these two classes. .PP The editor can handle both terminals which have an insert mode, and terminals which send a simple sequence to open a blank position on the current line. (Insert mode is preferable to the sequence to open a position on the scre error. .SH "SEE ALSO" getuid(2), intro(2). .\" @(#)setuid.2 1.4 .TH ENVIRON 5 .SH NAME environ \- user environment .SH DESCRIPTION An array of strings called the ``environment'' is made available by .IR exec (2) when a process begins. By convention, these strings have the form .IR name=value . The following names are used by various commands: .PP .PD 0 .TP .SM .B PATH The sequence of directory prefixes that commands such as .IR sh (1), .IR time (1), .IR nice (1), and .IR nohup (1) apply in searching for a file known by an incomplete pathname. The prefixes are separated by colons .RB ( \^:\^ ). .IR Login (1) sets .SM .BR PATH\*S=:/bin:/usr/bin . .sp .TP .SM .B HOME Name of the user's login directory, set by .IR login (1) from the password file .IR passwd (4). .sp .TP .SM .B TERM The kind of terminal for which output is to be prepared. This information is used by commands such as .IR mm (1), .IR vi (1), and .IR tplot (1G), which may exploit special capabilities of the terminal. .sp .TP .SM .B TZ Time zone information. The format is .BI xxx n zzz where .B xxx is the standard$ en if your terminal has both.) To specify \fBim\fR, give the sequence to get into insert mode or give an empty value if your terminal uses a sequence to insert a blank position. Give as \fBei\fR the sequence to leave insert mode If you gave \fBim\fR with an empty value, give \fBei\fR with an empty value also. Now give as \fBic\fR any sequence needed to be sent just before sending the character to be inserted. Most terminals with a true insert mode will not give \fBic\fR; terminals which send a sequence to open a screen position should give it here. If post-insert padding is needed, give this as a number of milliseconds in \fBip\fR (a string option). Any other sequence which may need to be sent after an insert of a single character may also be given in \fBip\fR. .PP It is occasionally necessary to move around while in insert mode to delete characters on the same line (e.g., if there is a tab after the insertion position). If your terminal allows motion while in insert mode you can give the capability \fBmi.TH SHMCTL 2 .SH NAME shmctl \- shared memory control operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int shmctl (" "shmid, cmd, buf" ) .BR int " shmid, cmd" ; .BR "struct shmid_ds \(**" buf ; .fi .SH DESCRIPTION .I Shmctl provides a variety of shared memory control operations as specified by .IR cmd . The following .IR cmd s are available: .RS .TP \w'IPC_RMID\ \ \ 'u .SM .B IPC_STAT Place the current value of each member of the data structure associated with .I shmid into the structure pointed to by .IR buf . The contents of this structure are defined in .IR intro (2). .SM {READ} .TP .SM .B IPC_SET Set the value of the following members of the data structure associated with .I shmid to the corresponding value found in the structure pointed to by .IR buf : .nf .RS \f2shm_perm.uid\f1 \f2shm_perm.gid\f1 \f2shm_perm.mode\f1 /\(** only low 9 bits \(**/ .fi .RE .IP This \fIcmd\fP can only be executed by a process that has an effective user .SM  local time zone abbreviation, .I n\^ is the difference in hours from .SM GMT\*S, and .B zzz is the abbreviation for the daylight-saving local time zone, if any; for example, .BR \s-1EST\s+15\s-1EDT\s+1 . .PD .PP Further names may be placed in the environment by the .I export\^ command and \fIname=value\fP arguments in .IR sh (1), or by .IR exec (2). It is unwise to conflict with certain shell variables that are frequently exported by .B .profile files, e.g., .SM .BR MAIL \*S, .SM .BR PS1 \*S, .SM .BR PS2 \*S, .SM .BR IFS \*S. .SH SEE ALSO env(1), login(1), sh(1), exec(2), getenv(3C), profile(4), term(5). .\" @(#)environ.5 1.4 \fR to speed up inserting in this case. Omitting \fBmi\fR will affect only speed. Some terminals (notably Datamedia's) must not have \fBmi\fR because of the way their insert mode works. .PP Finally, you can specify delete mode by giving \fBdm\fR and \fBed\fR to enter and exit delete mode; give \fBdc\fR to delete a single character while in delete mode. .PP .B "Highlighting, underlining, and visible bells" .PP If your terminal has sequences to enter and exit standout mode these can be given as \fBso\fR and \fBse\fR respectively. If there are several flavors of standout mode (such as inverse video, blinking, or underlining \- half bright is not usually an acceptable \*(lqstandout\*(rq mode unless the terminal is in inverse video mode constantly) the preferred mode is inverse video by itself. If the code to change into or out of standout mode leaves 1 or even 2 blank spaces on the screen, as the TVI 912 and Teleray 1061 do, then \fBug\fR should be given to tell how many spaces are left. .PP Codes to begin und% ID equal to either that of superuser or to the value of .I shm_perm.uid in the data structure associated with .IR shmid . .TP .SM .B IPC_RMID Remove the shared memory identifier specified by .I shmid from the system and destroy the shared memory segment and data structure associated with it. This \fIcmd\fP can only be executed by a process that has an effective user .SM ID equal to either that of superuser or to the value of .I shm_perm.uid in the data structure associated with .IR shmid . .PP .I Shmctl fails if one or more of the following are true: .IP .I Shmid is not a valid shared memory identifier. .SM \%[EINVAL] .IP .I Cmd is not a valid command. .SM \%[EINVAL] .IP .I Cmd is equal to .SM .B IPC_STAT and .SM {READ} operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP .I Cmd is equal to .SM .B IPC_RMID or .SM .B IPC_SET and the effective user .SM ID of the calling process is not equal to that of superuser and is not equal to the value of .I shm_perm.uid in the data'\" e .EQ gsize 10 .EN .TH EQNCHAR 5 .SH NAME eqnchar \- special character definitions for eqn and neqn .SH SYNOPSIS .B eqn /usr/pub/eqnchar [ files ] .B \(bv troff [ options ] .PP .B neqn /usr/pub/eqnchar [ files ] .B \(bv nroff [ options ] .SH DESCRIPTION .I Eqnchar\^ contains .IR troff (1) and .IR nroff (1) character definitions for constructing characters that are not available on the Wang Laboratories, Inc. C/A/T phototypesetter. These definitions are primarily intended for use with .IR eqn (1) and .IR neqn ; .I eqnchar\^ contains definitions for the following characters: .PP .nf .ta \w'angstrom 'u \n(.lu/4u +\w'angstrom 'u \n(.lu*2u/4u +\w'angstrom 'u .if t .RS .if t .vs 14p .EQ "ciplus" ciplus "|\|\^|" || "square" square .EN .EQ "citimes" citimes "langle" langle "circle" circle .EN .EQ "wig" wig "rangle" rangle "blot" blot .EN .EQ "\-wig" -wig "hbar" hbar "bullet" bullet .EN .EQ ">wig" >wig "ppd" ppd "prop" prop .EN .EQ "" <-> "empty" empty .EN .EQ "=wig" =wig "<=>" <=> "member" memberlining and end underlining can be given as \fBus\fR and \fBue\fR, respectively. If the terminal has a code to underline the current character and move the cursor one space to the right, such as the Microterm Mime, this can be given as \fBuc\fR. If the underline code does not move the cursor to the right, give the code followed by a nondestructive space. .PP Many terminals, such as the HP 2621, automatically leave standout mode when they move to a new line or the cursor is addressed. Programs using standout mode should exit standout mode before moving the cursor or sending a newline. .PP If the terminal has a way of flashing the screen to indicate an error quietly (a bell replacement), this can be given as \fBvb\fR; it must not move the cursor. If the terminal should be placed in a different mode during open and visual modes of .I ex, this can be given as \fBvs\fR and \fBve\fR, sent at the start and end of these modes, respectively. These can be used to change, e.g., from an underline to a block cursor and structure associated with .IR shmid . .SM \%[EPERM] .IP .I Buf points to an illegal address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO shmget(2), shmop(2). .\" @(#)shmctl.2 1.5 % er .EN .EQ "star" star "|\|\^<" |< "nomem" nomem .EN .EQ "bigstar" bigstar "|\|\^>" |> "cup" cup .EN .EQ "=dot" =dot "ang" ang "cap" cap .EN .EQ "orsign" orsign "rang" rang "incl" incl .EN .EQ "andsign" andsign "3dot" 3dot "subset" subset .EN .EQ "=del" =del "thf" thf "supset" supset .EN .EQ "oppA" oppA "quarter" quarter "!subset" !subset .EN .EQ "oppE" oppE "3quarter" 3quarter "!supset" !supset .EN .EQ "angstrom" angstrom "degree" degree "scrL" scrL .EN .EQ "==<" ==< "==>" ==> .EN .if t .vs .if t .RE .DT .SH FILES /usr/pub/eqnchar .SH SEE ALSO eqn(1), nroff(1), troff(1). .\" @(#)eqnchar.5 1.4  back. .PP If the terminal needs to be in a special mode when running a program that addresses the cursor, the codes to enter and exit this mode can be given as \fBti\fR and \fBte\fR. This need arises, for example, from terminals like the Concept-100 with more than one page of memory. If the terminal has only memory-relative cursor addressing and not screen relative cursor addressing, a 1-screen sized window must be fixed into the terminal for cursor addressing to work properly. .PP If the terminal correctly generates underlined characters (with no special codes needed), even though it does not overstrike, you should give the capability \fBul\fR. If overstrikes are erasable with a blank, this should be indicated by giving \fBeo\fR. .PP .B Keypad .PP If the terminal has a keypad that transmits codes when the keys are pressed, this information can be given. Note that it is not possible to handle terminals where the keypad only works in local (this applies, for example, to the unshifted HP 2621 keys). If the key.TH SHMGET 2 .SH NAME shmget \- get shared memory segment .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int shmget (" "key, size, shmflg" ) .BR key_t " key" ; .BR int " size, shmflg" ; .fi .SH DESCRIPTION .I Shmget returns the shared memory identifier associated with .IR key . .PP A shared memory identifier and associated data structure and shared memory segment of .I size bytes (see .IR intro (2)) are created for .I key if one of the following is true: .IP .I Key is equal to .SM .BR IPC_PRIVATE . .IP .I Key does not already have a shared memory identifier associated with it, and .RI ( shmflg " & " .SM .BR IPC_CREAT\*S ) is ``true''. .PP Upon creation, the data structure associated with the new shared memory identifier is initialized as follows: .IP .IR Shm_perm.cuid ", " shm_perm.uid , .IR shm_perm.cgid ", and " shm_perm.gid are set equal to the effective user .SM ID and effective group .SM ID\*S, respectively, of the calling process. .IP The low-'\" t .TH FCNTL 5 .SH NAME fcntl \- file control options .SH SYNOPSIS .B #include .SH DESCRIPTION The .IR fcntl (2) function provides for control over open files. This #include file describes .I requests\^ and .I arguments\^ to .IR fcntl (2) and .IR open (2). .PP .nf /\(** Flag values accessible to open(2) and fcntl(2) \(**/ /\(** (The first three can only be set by open) \(**/ .TS l1 l1p-1 l l. \f3#define O_RDONLY 0\f1 \f3#define O_WRONLY 1\f1 \f3#define O_RDWR 2\f1 \f3#define O_NDELAY 04\f1 /\(** Non-blocking \s-1I/O\s+1 \(**/ \f3#define O_APPEND 010\f1 /\(** append (writes guaranteed at the end) \(**/ .sp 1v .T& l s s s l1 l1p-1 l l. /\(** Flag values accessible only to open(2) \(**/ \f3#define O_CREAT 00400\f1 /\(** open with file create (uses third open arg)\(**/ \f3#define O_TRUNC 01000\f1 /\(** open with truncation \(**/ \f3#define O_EXCL 02000\f1 /\(** exclusive open \(**/ .sp 1v .T& l s s s l1 l1p-1 l l. /\(** fcntl(2) requests \(**/ \f3#define F_DUPFD 0\f1 /\(** Duplicate fildes \(**/ \f3& pad can be set to transmit or not transmit, give these codes as \fBks\fR and \fBke\fR; otherwise, the keypad is assumed to always transmit. The codes sent by the left arrow, right arrow, up arrow, down arrow, and home keys can be given as \fBkl, kr, ku, kd, \fRand\fB kh\fR, respectively. If there are function keys such as f0, f1, ..., f9, the codes they send can be given as \fBk0, k1, ..., k9\fR. If these keys have labels other than the default f0 through f9, the labels can be given as \fBl0, l1, ..., l9\fR. If there are other keys that transmit the same code as the terminal expects for the corresponding function, such as clear screen, the \fItermcap\fP 2-letter codes can be given in the \fBko\fR capability. For example, \*(lq:ko=cl,ll,sf,sb:\*(rq says that the terminal has clear, home down, scroll down, and scroll up keys that transmit the same thing as the \fBcl, ll, sf\fR, and \fBsb\fR entries. .PP The .B ma entry is also used to indicate arrow keys on terminals which have single character arrow keys. It order 9 bits of .I shm_perm.mode are set equal to the low-order 9 bits of .IR shmflg . .I Shm_segsz is set equal to the value of .IR size . .IP .IR Shm_lpid ", " shm_nattch ", .IR shm_atime ", and " shm_dtime " are set equal to 0. .IP .I Shm_ctime is set equal to the current time. .PP .I Shmget fails if one or more of the following are true: .IP .I Size is less than the system imposed minimum or greater than the system imposed maximum. .SM \%[EINVAL] .IP A shared memory identifier exists for .I key but operation permission (see .IR intro (2)), as specified by the low-order 9 bits of .IR shmflg , would not be granted. .SM \%[EACCES] .IP A shared memory identifier exists for .I key but the size of the segment associated with it is less than .I size and .I size is not equal to zero. .SM \%[EINVAL] .IP A shared memory identifier does not exist for .I key and .RI ( shmflg " &" .SM .BR IPC_CREAT\*S ) is ``false''. .SM \%[ENOENT] .IP A shared memory identifier is to be created but the system imposed limit on the ma#define F_GETFD 1\f1 /\(** Get fildes flags \(**/ \f3#define F_SETFD 2\f1 /\(** Set fildes flags \(**/ \f3#define F_GETFL 3\f1 /\(** Get file flags \(**/ \f3#define F_SETFL 4\f1 /\(** Set file flags \(**/ .TE .fi .SH "SEE ALSO" fcntl(2), open(2). .\" @(#)fcntl.5 1.5 is obsolete but still in use in version 2 of \fIvi\fR, which must be run on some minicomputers due to memory limitations. This field is redundant with .BR "kl, kr, ku, kd, " and " kh" . It consists of groups of 2 characters. In each group, the first character is what an arrow key sends, the second character is the corresponding \fIvi\fR command. These commands are .B h for .BR kl , .B j for .BR kd , .B k for .BR ku , .B l for .BR kr , and .B H for .BR kh . For example, the Mime would be .BR ":ma=^Kj^Zk^Xl:" , indicating arrow keys left (^H), down (^K), up (^Z), and right (^X). (There is no home key on the Mime.) .PP .B Miscellaneous .PP If the terminal requires other than a null (zero) character as a pad, this can be given as \fBpc\fR. .PP If tabs on the terminal require padding, or if the terminal uses a character other than \fB^I\fR to tab, this can be given as \fBta\fR. .PP Hazeltine terminals, which don't allow `~' characters to be printed, should indicate \fBhz\fR. Datamedia terminals, which echo carriag& ximum number of allowed shared memory identifiers system-wide would be exceeded. .SM \%[ENOSPC] .IP A shared memory identifier and associated shared memory segment are to be created but the amount of available physical memory is not sufficient to fill the request. .SM \%[ENOMEM] .IP A shared memory identifier exists for .I key but .RI "( (" shmflg " & " .SM .BR IPC_CREAT\*S ) " & " ( .IR shmflg " & " .SM .BR IPC_EXCL\*S ") )" is ``true''. .SM \%[EEXIST] .br .ne 7v .SH "RETURN VALUE" Upon successful completion a non-negative integer, i.e., a shared memory identifier, is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO shmctl(2), shmop(2). .\" @(#)shmget.2 1.6 .TH GREEK 5 .SH NAME greek \- graphics for the extended \s-1TTY\s+1-37 type-box .SH SYNOPSIS .B cat /usr/pub/greek [ \(bv .BR "greek \-T" terminal ] .SH DESCRIPTION .I Greek\^ gives the mapping from .SM ASCII to the ``shift-out'' graphics in effect between .SM .B SO and .SM .B SI on .SM TELETYPE\*S\*R Model 37 terminals equipped with a 128-character type-box. These are the default greek characters produced by .IR nroff . The filters of .IR greek (1) attempt to print them on various other terminals. The file contains: .PP .RS 3 .nf .if n .ta 10 +3 +6 +10 +3 +6 +10 +3 .if t .ta 6m +2m +4m +5m +2m +4m +5m +2m alpha \(*a A beta \(*b B gamma \(*g \e GAMMA \(*G G delta \(*d D DELTA \(*D W epsilon \(*e S zeta \(*z Q eta \(*y N THETA \(*H T theta \(*h O lambda \(*l L LAMBDA \(*L E mu \(*m M nu \(*n @ xi \(*c X pi \(*p J PI \(*P P rho \(*r K sigma \(*s Y SIGMA \(*S R tau \(*t I phi \(*f U PHI \(*F F psi \(*q V PSI \(*Q H omega \(*w C OMEGA \(*W Z nabla \(gr [ not \(no _ partial \(pd ] integral \(is ^ .fi .RE .SH FILESe-return linefeed for carriage return and then ignore a following linefeed, should indicate \fBnc\fR. Early Concept terminals, which ignore a linefeed immediately after an \fBam\fR wrap, should indicate \fBxn\fR. If an erase-eol is required to get rid of standout (instead of merely writing on top of it), \fBxs\fP should be given. Teleray terminals, where tabs turn all characters moved over to blanks, should indicate \fBxt\fR. Other specific terminal problems may be corrected by adding more capabilities of the form \fBx\fIx\fR. .PP Other capabilities include \fBis\fR, an initialization string for the terminal, and \fBif\fR, the name of a file containing long initialization strings. These strings are expected to properly clear and then set the tabs on the terminal, if the terminal has settable tabs. If both are given, \fBis\fR will be printed before \fBif\fR. This is useful where \fBif\fR is .I /usr/lib/tabset/std but \fBis\fR clears the tabs first. .PP .SH NOTE \fITermcap\fR is based on software developed by T.TH SHMOP 2 .SH NAME shmat, shmdt \- shared memory operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "char \(**shmat (" "shmid, shmaddr, shmflg" ) .BR int " shmid" ; .BR "char \(**" shmaddr .BR int " shmflg" ; .PP .BR "int shmdt (" shmaddr ) .BR "char \(**" shmaddr .fi .SH DESCRIPTION .I Shmat attaches the shared memory segment associated with the shared memory identifier specified by .I shmid to the data segment of the calling process. The segment is attached at the address specified by one of the following criteria: .IP If .I shmaddr is equal to zero, the segment is attached at the first available address as selected by the system. .IP If .I shmaddr is not equal to zero and .RI ( shmflg " &" .SM .B SHM_RND\*S) is ``true'', the segment is attached at the address given by .RI ( shmaddr " -" .RI ( shmaddr " modulus" .SM .BR SHMLBA\*S "))." .IP If .I shmaddr is not equal to zero and .RI ( shmflg " &" .SM .B SHM_RND\*S) is ``false'', the segmen'  /usr/pub/greek .SH SEE ALSO 300(1), 4014(1), 450(1), greek(1), hp(1), tc(1), nroff(1). .\" @(#)greek.5 1.2 he University of California, Berkeley, California, Computer Science Division, Department of Electrical Engineering and Computer Science. .sp 1 \fITermcap\fR will be replaced by \fIterminfo\fR in the next release. Transition tools will be provided. .PP .SH FILES .DT /etc/termcap file containing terminal descriptions .SH SEE ALSO ex(1), termcap(3), vi(1) .SH "WARNINGS AND BUGS" .I Ex allows only 256 characters for string capabilities, and the routines in .I termcap(3) do not check for overflow of this buffer. The total length of a single entry (excluding only escaped new-lines) may not exceed 1,024. .PP The .BR ma , .BR vs , and .B ve entries are specific to the .I vi program. .PP Not all programs support all entries. There are entries that are not supported by any program. t is attached at the address given by .IR shmaddr . .PP The segment is attached for reading if .RI ( shmflg " &" .SM .B SHM_RDONLY\*S) is ``true'' .SM \%{READ}\*S; otherwise it is attached for reading and writing .SM \%{READ/WRITE}\*S. .PP .I Shmat fails and does not attach the shared memory segment if one or more of the following are true: .IP .I Shmid is not a valid shared memory identifier. .SM \%[EINVAL] .IP Operation permission is denied to the calling process (see .IR intro (2)). .SM \% [EACCES] .IP The available data space is not large enough to accommodate the shared memory segment. .SM \%[ENOMEM] .IP .I Shmaddr is not equal to zero, and the value of .RI ( shmaddr " -" .RI ( shmaddr " modulus" .SM .BR SHMLBA\*S "))" is an illegal address. .SM \%[EINVAL] .IP .I Shmaddr is not equal to zero, .RI ( shmflg " &" .SM .B SHM_RND\*S) is ``false'', and the value of .I shmaddr is an illegal address. .SM \%[EINVAL] .IP The number of shared memory segments attached to the calling process would exceed the system.TH INTRO 5 .SH NAME intro \- introduction to miscellaneous facilities .SH DESCRIPTION This section describes facilities such as formatting documentation and setting the terminal environment. It also contains descriptions of various character set tables, flag values, and user-accessible data types. .\" @(#)intro.5 1.3 ' .TH TYPES 5 .SH NAME types \- primitive system data types .SH SYNOPSIS .B #include .SH DESCRIPTION The data types defined in the include file are used in system code; some data of these types are accessible to user code: .TS lB lB lB. typedef struct { int r[1]; } \(** physadr; typedef long daddr_t; typedef char \(** caddr_t; typedef unsigned int uint; typedef unsigned short ushort; typedef ushort ino_t; typedef short cnt_t; typedef long time_t; typedef int label_t[10]; typedef short dev_t; typedef long off_t; typedef long paddr_t; typedef long key_t; .TE .PP The form .I daddr_t\^ is used for disk addresses except in an inode on disk; see .IR fs (4). Times are encoded in seconds since 00:00:00 \s-1GMT\s0, January 1, 1970. The major and minor parts of a device code specify kind and unit number of a device and are installation-dependent. Offsets are measured in bytes from the beginning of a file. The .I label_t\^ variables are used to save the processor state while another process is running. .SH S imposed limit. .SM \%[EMFILE] .PP .I Shmdt detaches from the calling process's data segment the shared memory segment located at the address specified by .IR shmaddr. .PP .I Shmdt fails and does not detach the shared memory segment if .I shmaddr is not the data segment start address of a shared memory segment. .SM \%[EINVAL] .SH RETURN VALUES Upon successful completion, the return value is as follows: .br .ne 8v .IP .I Shmat returns the data segment start address of the attached shared memory segment. .IP .I Shmdt returns a value of 0. .PP Otherwise, a value of \-1 is returned and .I errno is set to indicate the error. .SH SEE ALSO exec(2), exit(2), fork(2), shmctl(2), shmget(2). .\" @(#)shmop.2 1.5 .tr ~" .if t .ds i \(fm\(fm .if n .ds i "" .TH MAN 5 .SH NAME man \- macros for formatting entries in this manual .SH SYNOPSIS .B nroff \-man files .PP .B troff \-man [ .B \-rs1 ] files .SH DESCRIPTION These .IR troff (1) macros are used to lay out the format of the entries of this manual. A skeleton entry may be found in the file .BR /usr/man/u_man/man0/skeleton . These macros are used by the .IR man (1) command. .PP The default page size is 8.5\*i\(mu11\*i, with a 6.5\*i\(mu10\*i text area; the .B \-rs1 option reduces these dimensions to 6\*i\(mu9\*i and 4.75\*i\(mu8.375\*i, respectively; this option, which is not effective in .IR nroff (1), also reduces the default type size from 10-point to 9-point and the vertical line spacing from 12-point to 10-point. The .B \-rV2 option may be used to set certain parameters to values appropriate for certain Versatec printers: it sets the line length to 82 characters and the page length to 84 lines, and it inhibits underlining; this option should not be confused with tEE ALSO fs(4). .\" @(#)types.5 1.5 ( .TH SIGNAL 2 .SH NAME signal \- specify what to do upon receipt of a signal .SH SYNOPSIS .B #include .PP .BR "int (\(**signal (" "sig, func" ))(\|) .br .BR int " sig" ; .br .BR "int (\(**" func )(\|); .SH DESCRIPTION .I Signal\^ allows the calling process to choose one of three ways in which it is possible to handle the receipt of a specific signal. .I Sig\^ specifies the signal and .I func\^ specifies the choice. .PP .I Sig\^ can be assigned any one of the following except .BR \s-1SIGKILL\s+1 : .PP .DS .TS l l l. \fB\s-1SIGHUP\s+1\fR 01 hangup \fB\s-1SIGINT\s+1\fR 02 interrupt \fB\s-1SIGQUIT\s+1\fR 03* quit \fB\s-1SIGILL\s+1\fR 04* illegal instruction (not reset when caught) \fB\s-1SIGTRAP\s+1\fR 05* trace trap (not reset when caught) \fB\s-1SIGIOT\s+1\fR 06* \s-1IOT\s+1 instruction \fB\s-1SIGEMT\s+1\fR 07* \s-1EMT\s+1 instruction \fB\s-1SIGFPE\s+1\fR 08* floating point exception \fB\s-1SIGKILL\s+1\fR 09 kill (cannot be caught or ignored) \fB\s-1SIGBUS\s+1\fR 10* bus error \fB\s-1SIGSEGV\s+1\he .B \-Tvp option of the .IR man (1) command, which is available at some .SM UNIX System sites. .PP Any .I text\^ argument below may be one to six ``words''. Double quotes .RB ( ~~ ) must be used to include blanks in a ``word''. If .I text\^ is empty, the special treatment is applied to the next line that contains text to be printed. For example, .SM .B \&.I may be used to italicize a whole line, or .SM .B \&.SM followed by .SM .B \&.B to make small bold text. By default, hyphenation is turned off for .I nroff\^ but remains on for .IR troff . .PP Type font and size are reset to default values before each paragraph and after processing font-setting and size-setting macros, e.g., .SM .BR \&.I\*S , .SM .BR \&.RB\*S , .SM .BR \&.SM\*S . Tab stops are neither used nor set by any macro except .SM .B \&.DT and .SM .BR \&.TH\*S . .PP Default units for indents (\f2in\f1) are ens. When a macro is given without the \f2in\f1 argument, the previous indent is used. The "remembered" indent is set to its default value by ...arithmetic.6back.6bj.6chess.6craps.6cubic.6hangman.6intro.6jotto.6maze.6moo.6quiz.6reversi.6sky.6ttt.6wump.6fR 11* segmentation violation \fB\s-1SIGSYS\s+1\fR 12* bad argument to system call \fB\s-1SIGPIPE\s+1\fR 13 write on a pipe with no one to read it \fB\s-1SIGALRM\s+1\fR 14 alarm clock \fB\s-1SIGTERM\s+1\fR 15 software termination signal \fB\s-1SIGUSR1\s+1\fR 16 user defined signal 1 \fB\s-1SIGUSR2\s+1\fR 17 user defined signal 2 \fB\s-1SIGCLD\s+1\fR 18 death of a child (see \fIWARNING\fR below) \fB\s-1SIGPWR\s+1\fR 19 power fail (see \fIWARNING\fR below) .TE .PP See below for the significance of the asterisk .RB ( \(** ) in the above list. .PP .I Func\^ is assigned one of three values: .BR \s-1SIG\(ruDFL\s+1 , .BR \s-1SIG\(ruIGN\s+1 , or a .IR "function address" . The actions prescribed by these values are as follows: .RS 2 .PP .SM .B SIG\(ruDFL \&\- terminate process upon receipt of a signal .RS 8 Upon receipt of the signal .IR sig , the receiving process is to be terminated with all of the consequences outlined in .IR exit (2); a ``core image'' is made in the current working directory of the receiving pro( the .BR \&.TH ,\| .P ,\| .SH ,\|and .B \&.SS\^ macros. This value is 7.2 ens in \fItroff\fR and 5 ens in \fInroff\fR; both are equal to 0.5 inches in the default page size. This means that within each subheading section (\s-1SYNOPSIS\s+1, \s-1DESCRIPTION\s+1, etc.) the default left margin is 0.5 inches to the right of the page offset (i.e., normal left margin) of the page. If the entire page width is needed (e.g., to format a large table), use \f3.in\f1 alone on a line to override the default indented margin. .PP Each macro description below includes the effect on indentation, as applicable. .PP .PD 0 .TP "\w'.TH t s c n 'u" .SM .BI \&.TH " \*St s c n\^" Set the title and entry heading; .I t\^ is the title, .I s\^ is the section number, .I c\^ is extra commentary, e.g., ``local'', .I n\^ is new manual name. Invokes .SM .B \&.DT (see below). .TP .SM .BI \&.SH " \*Stext\^" Place subhead .IR text , e.g., .SM .BR SYNOPSIS\*S , here. The text lines that follow the heading are block-style paragraphs; the whole.TH ARITHMETIC 6 .SH NAME arithmetic \- provide drill in number facts .SH SYNOPSIS .B /usr/games/arithmetic [ .B +\-x/ ] [ range ] .SH DESCRIPTION .I Arithmetic\^ types out simple arithmetic problems, and waits for an answer to be typed in. If the answer is correct, it types back ``\f3Right!\f1'', and a new problem. If the answer is wrong, it replies ``\f3What?\f1'', and waits for another answer. Every twenty problems, it publishes statistics on correctness and the time required to answer. .PP To quit the program, type an interrupt (delete). .PP The first optional argument determines the kind of problem to be generated; .BR + , .BR \- , .BR x , and .B / respectively cause addition, subtraction, multiplication, and division problems to be generated. One or more characters can be given; if more than one is given, the different types of problems will be mixed in random order; default is .BR +\- . .PP .I Range\^ is a decimal number; all addends, subtrahends, differences, multiplicands, divisors, and quotients wilcess if .I sig\^ is one for which an asterisk appears in the above list and the following conditions are met: .RS 8 .PP The effective user .SM ID and the real user .SM ID of the receiving process are equal. .PP An ordinary file named .B core exists and is writable or can be created. If the file must be created, it will have the following properties: .RS 8 .PP a mode of 0666 modified by the file creation mask .RI (see " umask" (2)) .PP a file owner .SM ID that is the same as the effective user .SM ID of the receiving process .PP a file group .SM ID that is the same as the effective group .SM ID of the receiving process .RE .RE .RE .RE .PP .SM .B SIG\(ruIGN \&\- ignore signal .RS 8 The signal .I sig\^ is to be ignored. .PP Note: the signal .B .SM SIGKILL cannot be ignored. .RE .PP .I function address\^ \&\- catch signal .RS 8 Upon receipt of the signal .IR sig , the receiving process is to execute the signal-catching function pointed to by .IR func . The signal number .I sig\^ is passed as the first argume block is indented 0.5 inches. .TP .SM .BI \&.SS " \*Stext\^" Place sub-subhead .IR text , e.g., .BR Options , here. The text lines that follow the heading are block-style paragraphs; the whole block is indented 0.5 inches. .TP .SM .BI \&.B " \*Stext\^" Make .I text\^ bold. .TP .SM .BI \&.I " \*Stext\^" Make .I text\^ italic. .TP .SM .BI \&.SM " \*Stext\^" Make .I text\^ 1 point smaller than default point size. .TP .SM .BI \&.RI " \*Sa b\^" Concatenate roman .I a\^ with italic .IR b , and alternate these two fonts for up to six arguments. Similar macros alternate between any two of roman, italic, and bold: .RS .RS .SM .B "\&.IR .RB .BR .IB .BI" .RE .RE .TP .SM .B \&.P Skip one vertical space and begin a paragraph with normal font, point size, and indent (0.5 inches). .SM .B \&.PP has the same effect as .SM .BR \&.P \*S. .TP .SM .BI \&.HP " \*Sin\^" Skip one vertical space and begin a paragraph with a hanging indent. The first line of the paragraph will be indented the default 0.5 inches from the pag) l be less than or equal to the value of .IR range . Default .I range\^ is 10. .PP At the start, all numbers less than or equal to .I range\^ are equally likely to appear. If the respondent makes a mistake, the numbers in the problem which was missed become more likely to reappear. .PP As a matter of educational philosophy, the program will not give correct answers, since the learner should, in principle, be able to calculate them. Thus the program is intended to provide drill for someone just past the first learning stage, not to teach number facts .I de\^ .IR novo . For almost all users, the relevant statistic should be time per problem, not percent correct. .\" @(#)arithmetic.6 1.3 nt to the signal-catching function. A second argument, \fIsig\(rucode\fP, is also passed to the function. \fISig\(rucode\fP has various contents, according to the value of \fIsig\fP. These values are provided in the table below. Before entering the signal-catching function, the value of .I func\^ for the caught signal is set to .SM .B SIG\(ruDFL unless the signal is .SM .BR SIGILL , .SM .BR SIGTRAP ", or" .SM .BR SIGPWR . .PP Upon return from the signal-catching function, the receiving process resumes execution at the point it was interrupted. See the WARNINGS section below. .PP When a signal that is to be caught occurs during a \fIread\fP(2), \fIwrite\fP(2), \fIopen\fP(2), or \fIioctl\fP(2) system call on a slow device (like a terminal; but not a file), during a .IR pause (2) system call, or during a .IR wait (2) system call that does not return immediately due to the existence of a previously stopped or zombie process, the signal catching function is executed; then the interrupted system call returns ae offset. The other lines will be indented the additional number of ens specified by \fIin\fR. .TP .SM .BI \&.TP " \*Sin\^" Skip one vertical space and begin indented paragraph with hanging tag. The next line that contains text to be printed is taken as the tag. The indentation from the beginning of the tag to the beginning of the paragraph is specified by the \fIin\fR argument. If the tag does not fit, it is printed on a separate line. Format within the paragraph can be controlled by using the \fInroff\fR commands \fB.br\fR and \fB.nf\fR (refer to the .IR "\*(6) Document Processing Guide" ). .TP .SM .BI \&.IP " \*St in\^" Same as .SM .BI \&.TP " \*Sin\^" with tag .IR t ; often used to get an indented paragraph without a tag. .TP .SM .BI \&.RS " \*Sin\^" Increase indentation relative to the current margin. If given without an argument, the text following the macro will be indented 0.5 inches. The \fB.RS\fR macro does not cause a vertical space to be inserted before the following output. Use \fB.sp\fR on t.TH BACK 6 .SH NAME back \- the game of backgammon .SH SYNOPSIS .B /usr/games/back .SH DESCRIPTION .I Back\^ is a program which provides a partner for the game of backgammon. It is designed to play at three different levels of skill, one of which you must select. In addition to selecting the opponent's level, you may also indicate that you would like to roll your own dice during your turns (for the superstitious players). You will also be given the opportunity to move first. The practice of each player rolling one die for the first move is not incorporated. .PP The points are numbered 1\-24, with 1 being white's extreme inner table, 24 being brown's inner table, 0 being the bar for removed white pieces and 25 the bar for brown. For details on how moves are expressed, type .B y when .I back\^ asks ``\f3Instructions?\f1'' at the beginning of the game. When .I back\^ first asks ``\f3Move?\f1'', type .B ? to see a list of move options other than entering your numerical move. .PP When the game is finished, .I back)  \-1 to the calling process with .I errno\^ set to .SM EINTR\*S. .PP Note: the signal .B .SM SIGKILL cannot be caught. .RE .RE .PP A call to .I signal\^ cancels a pending signal .I sig\^ except for a pending .B \s-1SIGKILL\s+1 signal. .PP .I Signal\^ fails if one or more of the following are true: .IP .I Sig\^ is an illegal signal number, including .SM .BR SIGKILL . .SM \%[EINVAL] .IP .I Func\^ points to an illegal address. .SM \%[EFAULT] .PP The table below shows how \*(5) handles M68000 traps. Most traps result in signals being sent to the user process that caused the trap. All other traps are considered to be STRAYFT, spurious interrupts. .PP The following meanings apply to information in the "SIGNAL CODE" column of the table: .IP code \=\= address means the address causing the fault .IP code \=\= pc means the program counter value at the time of the trap .IP code \=\= (%d0) means the user parameter to the TRAP instruction .sp .in The definitions of KINTDIV, KINTOVF, and KSUBRNG are provided in the includhe line before the \fB.RS\fR line to obtain this space. If an \fIin\fR argument is given, the \fB.RS\fR macro will indent the following output .I in\^ units from the current left margin. .TP .SM .BI \&.RE " \*Sk\^" Return to the .IR k th relative indent level (initially, .IR k =1; .IR k =0 is equivalent to .IR k =1); if .I k\^ is omitted, return to the most recent lower indent level. \fB\&.RS\fR/\fB.RE\fR pairs can be nested. .TP .SM .BI \&.PM " \*Sm\^" Produces proprietary markings; where .I m\^ may be .B P for .SM .BR PRIVATE\*S , .B N for .SM .BR NOTICE\*S , .B BP for .SM .BR "BELL LABORATORIES PROPRIETARY\*S" , or .B BR for .SM .BR "BELL LABORATORIES RESTRICTED\*S" . .TP .SM .B \&.DT Restore default tab settings (every 7.2 ens in .IR troff , 5 ens in .IR nroff ). .TP .SM .BI \&.PD " \*Sv\^" Set the interparagraph distance to .I v\^ vertical spaces. If .I v\^ is omitted, set the interparagraph distance to the default value (0.4v in .IR troff , 1v in .IR nroff ). .PD .PP The following .I strings\^ are defi\^ will ask you if you want the log. If you respond with .BR y , .I back\^ will attempt to append to or create a file .B back.log in the current directory. .SH FILES .PD 1u .TP 26 /usr/games/lib/backrules rules file .TP /tmp/b\(** log temp file .TP back.log log file .PD .SH BUGS The only level really worth playing is ``expert'', and it only plays the forward game. .br .I Back\^ will complain loudly if you attempt to make too many moves in a turn, but will become very silent if you make too few .br Doubling is not implemented. .\" @(#)back.6 1.3 e file \f3\f1. .DS .TS box center; l c l l l l c l l l l2 c2 l2 l2 l2. TRAP TRAP \& \& SIGNAL TYPE NO. ASSIGNMENT SIGNAL CODE = BUSERR 2 bus error SIGBUS address ADDRERR 3 address error SIGILL address INSTERR 4 illegal instruction SIGILL pc ZDVDERR 5 zero divide fault SIGFPE KINTDIV CHKTRAP 6 CHK instruction fault SIGFPE KSUBRNG TRAPVFT 7 TRAPV instruction fault SIGFPE KINTOVF PRIVFLT 8 T{ .nf privileged instruction fault .fi T} SIGILL pc TRCTRAP 9 trace trap SIGTRAP pc L1010FT 10 line 1010 emulator SIGILL pc L1111FT 11 line 1111 emulator SIGILL pc STRAYFT 24 spurious interrupt n/a n/a SYSCALL 32 TRAP 0 \- system call n/a (%d0) BPTFLT 33 TRAP 1 \- breakpoint SIGTRAP pc IOTTRAP 34 T{ .nf TRAP 2 \- simulate DEC IOT instruction .fi T} SIGIOT (%d0) EMTTRAP 35 T{ .nf TRAP 3 \- simulate DEC EMT instruction .fi T} SIGEMT (%d0) FPETRAP 36 T{ TRAP 4 \- floating point exception T} SIGFPE (%d0) .TE .DE .PD .PP .SH RETURN VALUE Upon successful completion, .I signal\^ returns the previous value of .I func\* ned: .PP .PD 0 .TP "\w'.TH t s c n 'u" .SM .B \e\(**R .if t \{\(rg in .IR troff , .B (Reg.) in .IR nroff (1). \} .if n \{``(Reg.)'' in .IR nroff (1), ``Registered'' symbol in .IR troff (1). \} .TP .SM .B \e\(**S Change to default type size. .TP .SM .B \e\(**(Tm Trademark indicator. .PD .PP The following .I "number registers\^" are given default values by .SM .BR \&.TH\*S : .PP .PD 0 .TP "\w'.TH t s c n 'u" .SM .B IN Left margin indent relative to subheads (default is 7.2 ens in .IR troff , 5 ens in .IR nroff ). .TP .SM .B LL Line length including .SM .BR IN \*S. .TP .SM .B PD Current interparagraph distance. .PD .SH WARNINGS In addition to the macros, strings, and number registers mentioned above, there are defined a number of .I internal\^ macros, strings, and number registers. Except for names predefined by .I troff and number registers .BR d , .BR m , and .BR y , all such internal names are of the form .IR XA , where .I X\^ is one of .BR ) , .BR ] , and .BR } , and .I A\^ stands for any alphanumeric char.TH BJ 6 .SH NAME bj \- the game of blackjack .SH SYNOPSIS .B /usr/games/bj .SH DESCRIPTION .I Bj\^ is a serious attempt at simulating the dealer in the game of blackjack (or twenty-one) as might be found in Reno. The following rules apply: .HP 5 The bet is $2 every hand. .IP A player ``natural'' (blackjack) pays $3. A dealer natural loses $2. Both dealer and player naturals is a ``push'' (no money exchange). .IP If the dealer has an ace up, the player is allowed to make an ``insurance'' bet against the chance of a dealer natural. If this bet is not taken, play resumes as normal. If the bet is taken, it is a side bet where the player wins $2 if the dealer has a natural and loses $1 if the dealer does not. .IP If the player is dealt two cards of the same value, he is allowed to ``double''. He is allowed to play two hands, each with one of these cards. (The bet is doubled also; $2 on each hand.) .IP If a dealt hand has a total of ten or eleven, the player may ``double down''. He may double the bet ($2 to $4) an^ for the specified signal .IR sig . Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO kill(1), kill(2), pause(2), ptrace(2), wait(2), setjmp(3C). .SH WARNINGS Two other signals that behave differently than the signals described above exist in this release of the system. They are: .PP .RS 8 .nf .ta \w'SIGMMMM 'u +\w'15\(** 'u .BR \s-1SIGCLD\s+1 " 18 death of a child (reset when caught)" .BR \s-1SIGPWR\s+1 " 19 power fail (not reset when caught)" .fi .RE .PP There is no guarantee that, in future releases of the .SM UNIX System, these signals will continue to behave as described below; they are included only for compatibility with other versions of the .SM UNIX System. Their use in new programs is strongly discouraged. .PP For these signals, .I func\^ is assigned one of three values: .BR \s-1SIG\(ruDFL\s+1 , .BR \s-1SIG\(ruIGN\s+1 , or a .IR "function address" . The actions prescribed by these values are as follows: .RS 2 .PP .SM .B SIG\(ruDFL - ignore signal .Racter. .PP If a manual entry needs to be preprocessed by .IR cw (1), .IR eqn (1) (or .IR neqn ), and/or .IR tbl (1), it must begin with a special line (described in .IR man (1)), causing the .I man\^ command to invoke the appropriate preprocessor(s). .PP The programs that prepare the Table of Contents and the Permuted Index for the User's Manual and Administrator's Manual assume the .SM .I NAME\*S\^ section of each entry consists of a single line of input that has the following format: .IP name[, \|name, \|name \|.\|.\|.] \|\e\- \|explanatory \|text .PP To eliminate ambiguity, the macro package increases the inter-word spaces in the .SM .I SYNOPSIS\*S\^ section of each entry. .PP The macro package itself uses only the roman font (so that one can replace, for example, the bold font by the constant-width font\-see .IR cw (1)). Of course, if the input text of an entry contains requests for other fonts (e.g., .SM .BR \&.I\*S , .SM .BR \&.RB\*S , .BR \efI ), the corresponding fonts must be mounted. If a single wor* d receive exactly one more card on that hand. .IP Under normal play, the player may ``hit'' (draw a card) as long as his total is not over twenty-one. If the player ``busts'' (goes over twenty-one), the dealer wins the bet. .IP When the player ``stands'' (decides not to hit), the dealer hits until he attains a total of seventeen or more. If the dealer busts, the player wins the bet. .IP If both player and dealer stand, the one with the largest total wins. A tie is a push. .PP The machine deals and keeps score. The following questions will be asked at appropriate times. Each question is answered by .B y followed by a new line for ``yes'', or just new line for ``no''. .PP .RS \f3?\f1 (means, ``do you want a hit?'') .br \f3Insurance?\f1 .br \f3Double down?\f1 .RE .PP Every time the deck is shuffled, the dealer so states and the ``action'' (total bet) and ``standing'' (total won or lost) is printed. To exit, hit the interrupt key (\s-1DEL\s0) and the action and standing will be printed. .\" @(#)bj.6 1.3 S 8 The signal is to be ignored. .RE .PP .SM .B SIG\(ruIGN - ignore signal .RS 8 The signal is to be ignored. If .I sig\^ is .SM .BR SIGCLD , the calling process's child processes do not create zombie processes when they terminate; see .IR exit (2). .RE .PP .I function address\^ - catch signal .RS 8 If the signal is .SM .BR SIGPWR , the action to be taken is the same as that described above for .I func\^ equal to .IR "function address" . The same is true if the signal is .SM .BR SIGCLD , except that, while the process is executing the signal-catching function, any received .SM .B SIGCLD signals are queued and the signal-catching function is continually reentered until the queue is empty. .RE .PP The .SM .B SIGCLD affects two other system calls .RI ( wait "(2) and " exit (2)) in the following ways: .TP 8 .I wait\^ If the .I func\^ value of .SM .B SIGCLD is set to .SM .B SIG\(ruIGN and a .I wait\^ is executed, the .I wait\^ blocks until all of the calling process's child processes terminate; it then returns a d or short phrase needs to be italicized or emboldened, the following usage can be placed within a line, rather than creating a separate .B or .I line: \\fItext\\fR. .PP \fINroff\fR and \fItroff\fR formatting commands and macros are described in the \*(6) Document Processing Guide. .SH FILES /usr/lib/tmac/tmac\f3.\fPan .br /usr/lib/macros/cmp\f3.\fP[nt]\f3.\fP[dt]\f3.\fPan .br /usr/lib/macros/ucmp\f3.\fP[nt]\f3.\fPan .br /usr/man/[ua]_man/man0/skeleton .br .ne 8v .SH SEE ALSO man(1), nroff(1), troff(1). .SH BUGS When using the macros to alternate fonts (e.g., .RB, .IR), quotation marks must be used to maintain spacing. For example, \f3.IR filename\f1 produces filename as one word. \f3\&.IR "file " name\f1 produces it as two words. .tr ~~ .\" @(#)man.5 1.5  .TH CHESS 6 .SH NAME chess \- the game of chess .SH SYNOPSIS .B /usr/games/chess .SH DESCRIPTION .I Chess\^ is a computer program that plays class D chess. Moves may be given either in standard (descriptive) notation or in algebraic notation. The symbol .B + must be placed at the end of a line when the move on that line places the opponent's king in check. .B o-o and .B o-o-o specify castling, king side or queen side, respectively. .PP The user is prompted for a move or command by a .BR \(** . To play black, type .B first at the onset of the game. To print a copy of the board in play, type a carriage return only. Each move is echoed in the appropriate notation, followed by the program's reply. Near the middle and end games, the program can take considerable time in computing its moves. .PP A .B ? or .B help may be typed to get a help message that briefly describes the possible commands. .SH DIAGNOSTICS The most cryptic diagnostic is ``\f3eh?\f1'' which means that the input was syntactically incorrect. .SH + value of \-1 with .I errno\^ set to .SM ECHILD. .TP 8 .I exit\^ If in the exiting process's parent process the .I func\^ value of .SM .B SIGCLD is set to .SM .BR SIG\(ruIGN , the exiting process does not create a zombie process. .PP When processing a pipeline, the shell makes the last process in the pipeline the parent of the preceding processes. A process that may be piped into in this manner (and thus become the parent of other processes) should take care not to set .SM .B SIGCLD to be caught. .sp The ability to resume execution upon return from the signal-catching function is machine-dependent. For the M68000, resumption cannot occur after faults requiring instruction recovery. These faults are bus errors and address errors. .\" @(#)signal.2 1.10 .TH MM 5 .SH NAME mm \- the \s-1MM\s+1 macro package for formatting documents .SH SYNOPSIS .B mm [ options ] [ files ] .PP .B "nroff \-mm" [ options ] [ files ] .PP .B "nroff \-cm" [ options ] [ files ] .sp 1v .B mmt [ options ] [ files ] .PP .B "troff \-mm" [ options ] [ files ] .PP .B "troff \-cm" [ options ] [ files ] .SH DESCRIPTION This package provides a formatting capability for a wide variety of documents. The manner in which a document is typed and edited is essentially independent of whether the document is to be eventually formatted at a terminal or phototypeset. See the references below for further details. .PP The .B \-mm option causes .IR nroff (1) and .IR troff (1) to use the non-compacted version of the macro package, while the .B \-cm option results in the use of the compacted version, thus speeding up the process of loading the macro package. .SH FILES .PD 0 .TP "\w'/usr/lib/macros/cmp\f3.\fP[nt]\f3.\fP[dt]\f3.\fPm 'u" /usr/lib/tmac/tmac\f3.\fPm pointer to the non-compacted version of theBUGS Pawns may be promoted only to queens. .\" @(#)chess.6 1.4 .TH STAT 2 .SH NAME stat, fstat \- get file status .SH SYNOPSIS .B #include .br .B #include .PP .BR "int stat (" "path, buf" ) .br .BR "char \(**" path ; .br .BR "struct stat \(**" buf ; .PP .BR "int fstat (" "fildes, buf" ) .br .BR int " fildes" ; .br .BR "struct stat \(**" buf ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. Read, write or execute permission of the named file is not required, but all directories listed in the pathname leading to the file must be searchable. .I Stat\^ obtains information about the named file. .PP Similarly, .I fstat\^ obtains information about an open file known by the file descriptor .IR fildes , obtained from a successful .IR open (2), .IR creat (2), .IR dup (2), .IR fcntl (2), or .IR pipe (2) system call. .PP .I Buf\^ is a pointer to a .I stat\^ structure into which information is placed concerning the file. .PP The contents of the structure pointed to by .I buf\^ include the following members: .sp .RS .ta 8n 18n \f3ushort \f2st_m+  package .TP /usr/lib/macros/mm[nt] non-compacted version of the package .TP /usr/lib/macros/cmp\f3.\fP[nt]\f3.\fP[dt]\f3.\fPm compacted version of the package .TP /usr/lib/macros/ucmp\f3.\fP[nt]\f3.\fPm initializers for the compacted version of the package .PD .SH SEE ALSO .tr ~ .PD 0 mm(1), mmt(1), nroff(1), troff(1). .br .IR "\*(6) Document Processing Guide" . .br .I "\s-1MM\s+1\-Memorandum Macros\^" by D.~W. Smith and J.~R. Mashey. .br .I "Typing Documents with \s-1MM\s+1\^" by D.~W. Smith and E.~M. Piskorik. .PD .br .tr ~~ .\" @(#)mm.5 1.4 .tr ~ .TH CRAPS 6 .SH NAME craps \- the game of craps .SH SYNOPSIS .B /usr/games/craps .SH DESCRIPTION .I Craps\^ is a form of the game of craps that is played in Las Vegas. The program simulates the .IR roller , while the user (the .IR player ) places bets. The player may choose, at any time, to bet with the roller or with the .IR House . A bet of a negative amount is taken as a bet with the House, any other bet is a bet with the roller. .PP The player starts off with a ``bankroll'' of $2,000. .PP The program prompts with: .IP \f3bet?\f1 .PP The bet can be all or part of the player's bankroll. Any bet over the total bankroll is rejected and the program prompts with .B bet? until a proper bet is made. .PP Once the bet is accepted, the roller throws the dice. The following rules apply (the player wins or loses depending on whether the bet is placed with the roller or with the House; the odds are even). The .I first\^ roll is the roll immediately following a bet: .IP 1. On the first roll: .PP .RS 12 .PD 0 .TP "ode\f3;\f1 /\(** File mode; see .IR mknod (2) \(**/ .br \f3ino_t\f2 st_ino\f3;\f1 /\(** Inode number \(**/ .br \f3dev_t\f2 st_dev\f3;\f1 /\(** .SM ID of device containing \(**/ .br /\(** a directory entry for this file \(**/ .br \f3dev_t\f2 st_rdev\f3;\f1 /\(** .SM ID of device \(**/ .br /\(** This entry is defined only for \(**/ .br /\(** character special or block \(**/ .br /\(** special files \(**/ .br \f3short\f2 st_nlink\f3;\f1 /\(** Number of links \(**/ .br \f3ushort\f2 st_uid\f3;\f1 /\(** User .SM ID of the file's owner \(**/ .br \f3ushort\f2 st_gid\f3;\f1 /\(** Group .SM ID of the file's group \(**/ .br \f3off_t\f2 st_size\f3;\f1 /\(** File size in bytes \(**/ .br \f3time_t\f2 st_atime\f3;\f1 /\(** Time of last access \(**/ .br \f3time_t\f2 st_mtime\f3;\f1 /\(** Time of last data modification \(**/ .br \f3time_t\f2 st_ctime\f3;\f1 /\(** Time of last file status change \(**/ .br /\(** Times measured in seconds since \(**/ .br /\(** 00:00:00 .SM GMT\*S, Jan. 1, 1970 \(**/ .RE .DT .PP \fISt.TH MOSD 5 .SH NAME mosd \- the \s-1OSDD\s+1 adapter macro package for formatting documents .SH SYNOPSIS .B osdd [ options ] [ files ] .PP .B "mm \-mosd" [ options ] [ files ] .PP .B "nroff \-mm \-mosd" [ options ] [ files ] .PP .B "nroff \-cm \-mosd" [ options ] [ files ] .sp 1v .B "mmt \-mosd" [ options ] [ files ] .PP .B "troff \-mm \-mosd" [ options ] [ files ] .PP .B "troff \-cm \-mosd" [ options ] [ files ] .SH DESCRIPTION The \s-1OSDD\s+1 adapter macro package is a tool used in conjunction with the .IR mm (1) macro package to prepare Operations Systems Deliverable Documentation. Many of the \s-1OSDD\s+1 Standards are different than the default format provided by .IR mm (1). The \s-1OSDD\s+1 adapter package sets the appropriate .IR mm (1) options for automatic production of the \s-1OSDD\s+1 Standards. The \s-1OSDD\s+1 adapter package also generates the correct .SM OSDD page headers and footers, heading styles, Table of Contents format, etc. .PP .SM OSDD document (input) files are prepared with the .IR m, \w'any~other~number\ \ \ 'u" 7~or~11 wins for the roller; .TP 2,~3,~or~12 wins for the House; .TP any~other~number is the .IR point , roll again (Rule 2 applies). .RE .PD .IP 2. On subsequent rolls: .RS 12 .PD 0 .TP "\w'any~other~number\ \ \ 'u" point roller wins; .TP 7 House wins; .TP any~other~number roll again. .RE .PD .PP If a player loses the entire bankroll, the House will offer to lend the player an additional $2,000. The program will prompt: .IP \f3marker?\f1 .PP A .B yes (or .BR y ) consummates the loan. Any other reply terminates the game. .PP If a player owes the House money, the House reminds the player, before a bet is placed, how many markers are outstanding. .PP If, at any time, the bankroll of a player who has outstanding markers exceeds $2,000, the House asks: .IP \f3Repay marker?\f1 .PP A reply of .B yes (or .BR y ) indicates the player's willingness to repay the loan. If only 1 marker is outstanding, it is immediately repaid. However, if more than 1 marker are outstanding, the House asks: ._atime\fP, \fIst_mtime\fP, and \fIst_ctime\fP are changed by system calls as stated below. .sp .TP 10 .I st_atime Time when file data was last accessed. Changed by the following system calls: .IR creat (2), .IR mknod (2), .IR pipe (2), .IR utime (2), and .IR read (2). .TP 10 .I st_mtime Time when data was last modified. Changed by the following system calls: .IR creat (2), .IR mknod (2), .IR pipe (2), .IR utime (2), and .IR write (2). .TP 10 .I st_ctime Time when file status was last changed. Changed by the following system calls: .IR chmod (2), .IR chown (2), .IR creat (2), .IR link (2), .IR mknod (2), .IR pipe (2), .IR unlink (2), .IR utime (2), and .IR write (2). .PP .I Stat\^ fails if one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP The named file does not exist. .SM \%[ENOENT] .IP Search permission is denied for a component of the path prefix. .SM \%[EACCES] .IP .I Buf\^ or .I path\^ points to an invalid address. .SM \%[EFAULT] .PP .I Fstatm (1) macros. Additional information which must be given at the beginning of the document file is specified by the following string definitions: .RS .nf \&.ds H1 document-number \&.ds H2 section-number \&.ds H3 issue-number \&.ds H4 date \&.ds H5 rating .fi .RE .PP The .I document-number should be of the standard 10-character format. The words ``Section'' and ``Issue'' should not be included in the string definitions; they will be supplied automatically when the document is printed. For example, .RS .nf \&.ds H1 \s-1OPA\s+1\-1\s-1P\s+1\&135\-01 \&.ds H2 4 \&.ds H3 2 .fi .RE automatically produces .RS .nf \s-1OPA\s+1\&-1\s-1P\s+1\&135-01 Section 4 Issue 2 .fi .RE as the document page header. Quotation marks are not used in string definitions. .PP If certain information is not to be included in a page header, the string is defined as null; e.g., .RS .nf \&.ds H2 .fi .RE means that there is no .IR section-number . .PP The \s-1OSDD\s+1 Standards require that the .I "Table of Contents" be numbered beginning with .IP \f3How many?\f1 .PP markers the player would like to repay. If an invalid number is entered (or just a carriage return), an appropriate message is printed and the program will prompt with .B How~many? until a valid number is entered. .PP If a player accumulates 10 markers (a total of $20,000 borrowed from the House), the program informs the player of the situation and exits. .PP Should the bankroll of a player who has outstanding markers exceed $50,000, the .I total\^ amount of money borrowed will be .I automatically\^ repaid to the House. .PP Any player who accumulates $100,000 or more breaks the bank. The program then prompts: .IP \f3New game?\f1 .PP to give the House a chance to win back its money. .PP Any reply other than .B yes is considered to be a .B no (except in the case of .B bet? or .BR How~many? ). To exit, send an interrupt (break), \s-1DEL\s+1, or \s-1CONTROL\s+1-\s-1D\s+1. The program will indicate whether the player won, lost, or broke even. .SH MISCELLANEOUS The random number generator for, \^ fails if one or more of the following are true: .IP .I Fildes\^ is not a valid open file descriptor. .SM \%[EBADF] .IP .I Buf\^ points to an invalid address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" chmod(2), chown(2), creat(2), link(2), mknod(2), time(2), unlink(2). .\" @(#)stat.2 1.5 IR "Page 1" . By default, the first page of text will be numbered .IR "Page 2" . If the .I "Table of Contents" has more than one page, for example .IR n , either .BI \-rP n+1 must be included as a command line option or .B "\&.nr P n" must be included in the document file. For example, if the .I "Table of Contents" is four pages, use .B \-rP5 on the command line or .B "\&.nr\ P\ 4" in the document file. .PP The .SM OSDD Standards require that certain information such as the document .I rating appear on the .I "Document Index" or on the .I "Table of Contents" page if there is no index. By default, it is assumed that an index has been prepared separately. If there is no index, the following must be included in the document file: .RS .nf \&.nr Di 0 .fi .RE This will ensure that the necessary information is included on the .I "Table of Contents" page. .PP The \s-1OSDD\s+1 Standards require that all numbered figures be placed at the end of the document. The .B .Fg macro is used to produce full page figures. This m the die numbers uses the seconds from the time of day. Depending on system usage, these numbers, at times, may seem strange but occurrences of this type in a real dice situation are not uncommon. .tr ~~ .\" @(#)craps.6 1.3 .TH STIME 2 .SH NAME stime \- set time .SH SYNOPSIS .BR "int stime (" tp ) .br .BR "long \(**" tp ; .SH DESCRIPTION .I Stime\^ sets the system's idea of the time and date. .I Tp\^ points to the value of time as measured in seconds from 00:00:00 \s-1GMT\s0 January 1, 1970. .PP .I Stime\^ fails if the effective user .SM ID of the calling process is not superuser. .SM \%[EPERM] .SH RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" time(2). .\" @(#)stime.2 1.4 - acro produces a blank page with the appropriate header, footer, and figure caption. Insertion of the actual figure on the page is a manual operation. The macro usage is .RS .nf \&.Fg page-count "figure caption" .fi .RE where .I page-count is the number of pages required for a multi-page figure (default 1 page). .PP Figure captions are produced by the .B \&.Fg macro using the .BR \&.\s-1BS\s+1 / .\s-1BE\s+1 macros; therefore, the .BR \&.\s-1BS\s+1 / .\s-1BE\s+1 macros are not available for users. The .B \&.Fg macro cannot be used within the document unless the final .B \&.Fg in a series of figures is followed by a .B \&.\s-1SK\s+1 macro to force out the last figure page. .PP The .I "Table of Contents" for .SM OSDD documents (see Figure 4 in Section 4.1 of the \s-1OSDD\s+1 Standards) is produced with: .RS .nf \&.Tc System Type System Name Document Type \&.Td .fi .RE The .BR \&.Tc / .Td macros are used instead of the .B "\&.\s-1TC\s+1" macro from .IR mm (1). .PP By default, the adapter package causes the .SM \fB.\" @(#)cubic.6 1.2 .so /usr/man/u_man/man6/ttt.6 sync.2sys3b.2time.2times.2ulimit.2umask.2umount.2uname.2unlink.2ustat.2utime.2wait.2write.2NOTICE\fP disclosure statement to be printed. The .B \&.\s-1PM\s+1 macro may be used to suppress the .SM \fBNOTICE\fP or to replace it with the .SM \fBPRIVATE\fP disclosure statement as follows: .PP .RS .PD 0 .TP 10 \&.\s-1PM\s+1 none printed .TP 10 \&.\s-1PM P\s+1 .SM PRIVATE printed .TP 10 \&.\s-1PM N\s+1 .SM NOTICE printed (default) .PD .RE .PP The .SM .B \&.P macro is used for paragraphs. The .B Np register is set automatically to indicate the paragraph numbering style. It is very important that the .SM .B \&.P macro be used correctly. All paragraphs (including those immediately following a .SM .B \&.H macro) must use a .SM .B \&.P macro. Unless there is a .SM .B \&.P macro, there will not be a number generated for the paragraph. Similarly, the .SM .B \&.P macro should not be used for text which is not a paragraph. The .SM .B \&.SP macro may be appropriate for these cases, e.g., for ``paragraphs'' within a list item. .PP The page header format is produced automatically in accordance with the .SM OSDD Stan- .TH HANGMAN 6 .SH NAME hangman \- guess the word .SH SYNOPSIS .B /usr/games/hangman [ arg ] .SH DESCRIPTION .I Hangman\^ chooses a word at least seven letters long from a dictionary. The user is to guess letters one at a time. .PP The optional argument .I arg\^ names an alternate dictionary. .SH FILES /usr/lib/w2006 .SH BUGS Hyphenated compounds are run together. .\" @(#)hangman.6 1.2 .TH SYNC 2 .SH NAME sync \- update super-block .SH SYNOPSIS .B void sync ( ) .SH DESCRIPTION .I Sync\^ causes all information in memory that should be on disk to be written out. This includes modified super-blocks, modified inodes, and delayed block I/O. .PP It should be used by programs which examine a file system, for example .IR fsck "(1M) and" .IR df (1M). It is mandatory before a boot. .PP The writing, although scheduled, is not necessarily complete upon return from .IR sync . .SH "SEE ALSO" .IR "\*(6) Administrator's Manual" . .\" @(#)sync.2 1.4 dards. The .SM OSDD Adapter macro package uses the .SM .B \&.TP macro for this purpose. Therefore the .SM .B \&.TP macro normally available in .IR mm (1) is not available for users. .SH FILES /usr/lib/tmac/tmac.osd .SH SEE ALSO .PD 0 mm(1), mmt(1), nroff(1), troff(1), mm(5). .PP .I "\s-1MM\s+1\-Memorandum Macros\^" by D. W. Smith and J. R. Mashey. .PP .IR "Operations Systems Deliverable Documentation Standards\^" , June 1980. .PD .\" @(#)mosd.5 1.3 .TH INTRO 6 .SH NAME intro \- introduction to games .SH DESCRIPTION This section describes the recreational and educational programs found in the directory .BR /usr/games . The availability of these programs may vary from system to system. .\" @(#)intro.6 1.2 . 2}zwtq.TH MPTX 5 .SH NAME mptx \- the macro package for formatting a permuted index .SH SYNOPSIS .B "nroff \-mptx" [ options ] [ files ] .PP .B "troff \-mptx" [ options ] [ files ] .SH DESCRIPTION This package provides a definition for the .B \&.xx macro used for formatting a permuted index as produced by .IR ptx (1). This package does not provide any other formatting capabilities such as headers and footers. If these or other capabilities are required, the .I mptx\^ macro package may be used in conjunction with the .IR mm (1) macro package. In this case, the .B \-mptx option must be invoked \fIafter\fP the .B \-mm call. For example: .PP .RS .BI "nroff \-cm \-mptx " file .RE or .RS .BI "mm \-mptx " file .RE .SH FILES .PD 0 .TP "\w'/usr/lib/tmac/tmac\f3.\fPptx 'u" /usr/lib/tmac/tmac\f3.\fPptx pointer to the non-compacted version of the package .TP /usr/lib/macros/ptx non-compacted version of the package .PD .SH SEE ALSO .PD 0 mm(1), nroff(1), ptx(1), troff(1), mm(5). .\" @(#)mptx.5 1.3 .TH JOTTO 6 .SH NAME jotto \- secret word game .SH SYNOPSIS .B /usr/games/jotto .RB [ \|\-p\| ] .SH DESCRIPTION .I Jotto is a word guessing game. You try to guess the computer's secret word before it guesses yours. Clues are obtained by entering probe words. For example, if the computer's secret word is ``brown'' and you probe with ``stare'', it will reply ``1'' indicating that there is one letter in common between your probe and the secret word. Double letters count only once unless they appear in both words. For example, if the hidden word is ``igloo'' and you probe with ``broke'', the computer will reply ``1''. But if you probe with ``gloom'', the computer will respond ``4''. All secret words and probe words should be non-proper English five-letter words. If the computer guesses your word exactly, please respond with ``y''. It will then tell you what its secret word was. The .B \-p flag instructs the computer to report its progress in guessing your word. .SH BUGS The dictionary contains some unusual words +1). .I Arg1 is used as a pointer to a 16 byte string to be converted to a \s-1PRM\s+1 and transmitted to the Emergency Action Interface (\s-1EAI\s+1). .TP 5 .B 7 Modify the System Status Register (\s-1SSR\s+1). Bits set in .I arg1 are set or cleared in the \s-1SSR\s+1 if .I arg2 is non-zero or zero, respectively. .TP 5 .B 8 Read \s-1EAI\s+1 Input Parameter Buffer. .I Arg1 is used as a location in user space where the current Input Parameter Buffer is to be placed. .TP 5 .B 9 Change default Field Test Set utility-id. .B 10 Change the floating point flag bits in the extended processor status word. .SH SEE ALSO fts(1M), ipb(1M), prm(1M), reboot(1M), setmrf(1M), ssr(1M), in the .IR "U\s-1NIX\s+1 System Administrator's Manual" . .\" @(#)sys3b.2 1.1 . .ds . \f3.\fP .TH MV 5 .SH NAME mv \- a troff macro package for typesetting viewgraphs and slides .SH SYNOPSIS .B mvt [ .B \-a ] [ options ] [ files ] .PP .B troff [ .B \-a ] [ .B \-rX1 ] .B \-mv [ options ] [ files ] .SH DESCRIPTION This package makes it easy to typeset viewgraphs and projection slides in a variety of sizes. A few macros (briefly described below) accomplish most of the formatting tasks needed in making transparencies. All the facilities of .IR troff (1), .IR cw (1), .IR eqn (1), and .IR tbl (1) are available for more difficult tasks. .PP The output can be previewed on most terminals (in particular, the Tektronix 4014) and on the Versatec printer. For these two devices, specify the .B \-rX1 option (this option is automatically specified by the .IR mvt command when that command is invoked with the .B \-T4014 or .B \-Tvp options; see \fImmt\fR(1)). To preview output on other terminals, specify the .B \-a option. .PP The available macros are: .nr x \w#\f3.SW \|\fP#u .TP "\w#\f3\&.DV\fP\ \f1[\fPaand lacks some common ones. .\" @(#)jotto.6 1.2 .TH TIME 2 .SH NAME time \- get time .SH SYNOPSIS .B long time ((long \(**) 0) .PP .BR "long time (" tloc ) .br .BR "long \(**" tloc ; .SH DESCRIPTION .I Time\^ returns the value of time in seconds since 00:00:00 \s-1GMT\s0, January 1, 1970. .PP If .I tloc\^ (taken as an integer) is non-zero, the return value is also stored in the location to which .I tloc\^ points. .PP .I Time\^ fails if .I tloc\^ points to an illegal address. .SM \%[EFAULT] .SH RETURN VALUE Upon successful completion, .I time\^ returns the value of time. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" stime(2). .\" @(#)time.2 1.4 \f1]\fP\ \f1[\fPb\f1]\fP\ \f1[\fPc\f1]\fP\ \f1[\fPd\f1]\fP\ \ #u" .BI \&.VS "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Foil-start macro; foil size is to be 7\(fm\(fm\^\(mu7\(fm\(fm; .I n\^ is the foil number, .I i\^ is the foil identification, .I d\^ is the date; the foil-start macro resets all parameters (e.g., indent, point size) to initial default values, except for the values of .I i\^ and .I d\^ arguments inherited from a previous foil-start macro; it also invokes the .B \&.A macro (see below). .IP The naming convention for this and the following 8 macros is that the first character of the name .RB ( V or .BR S ) distinguishes between viewgraphs and slides, while the second character indicates whether the foil is square .RB ( S ), small wide .RB ( w ), small high .RB ( h ), big wide .RB ( W ), or big high .RB ( H ). Slides are narrower than the corresponding viewgraphs: the ratio of the longer dimension to the shorter one is larger for slides than for viewgraphs. As a result, slide foils / .TH MAZE 6 .SH NAME maze \- generate a maze .SH SYNOPSIS .B /usr/games/maze .SH DESCRIPTION .I Maze\^ asks a few questions and then prints a maze. .SH BUGS Some mazes (especially small ones) have no solutions. .\" @(#)maze.6 1.3 .TH TIMES 2 .SH NAME times \- get process and child process times .SH SYNOPSIS .B #include .br .B #include .PP .BR "long times (" buffer ) .br .BR "struct tms \(**" buffer ; .SH DESCRIPTION .I Times\^ fills the structure pointed to by .I buffer\^ with time-accounting information. Contents of the structure are: .PP .nf .ta .5i 1i 1.75i \f3struct tms {\f1 \f3time_t\f2 tms_utime\f3;\f1 \f3time_t\f2 tms_stime\f3;\f1 \f3time_t\f2 tms_cutime\f3;\f1 \f3time_t\f2 tms_cstime\f3;\f1 \f3};\f1 .fi .PP This information comes from the calling process and each of its terminated child processes for which it has executed a .IR wait . All times are in 60ths of a second. .PP .I Tms_utime\^ is the .SM CPU time used while executing instructions in the user space of the calling process. .PP .I Tms_stime\^ is the .SM CPU time used by the system on behalf of the calling process. .PP .I Tms_cutime\^ is the sum of the .IR "tms_utime"s and .IR "tms_cutime"s of the child processes. .PP .I Tms_cstime\^ iscan be used for viewgraphs, but not vice versa; on the other hand, viewgraphs can accommodate a bit more text. .TP .BI \&.Vw "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 7\(fm\(fm wide \(mu 5\(fm\(fm high. .PD 0 .TP .BI \&.Vh "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 5\(fm\(fm\^\(mu7\(fm\(fm. .TP .BI \&.VW "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 7\(fm\(fm\^\(mu5.4\(fm\(fm. .TP .BI \&.VH "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 7\(fm\(fm\^\(mu9\(fm\(fm. .TP .BI \&.Sw "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 7\(fm\(fm\^\(mu5\(fm\(fm. .TP .BI \&.Sh "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 5\(fm\(fm\^\(mu7\(fm\(fm. .TP .BI \&.SW "\h#|\nxu#\f1[\fP.TH MOO 6 .SH NAME moo \- guessing game .SH SYNOPSIS .B /usr/games/moo .SH DESCRIPTION .I Moo\^ is a guessing game imported from England. The computer picks a number consisting of four distinct decimal digits. The player guesses four distinct digits being scored on each guess. A ``cow'' is a correct digit in an incorrect position. A ``bull'' is a correct digit in a correct position. The game continues until the player guesses the number (a score of four bulls). .\" @(#)moo.6 1.2 /  the sum of the .IR "tms_stime" s and .IR "tms_cstime" s of the child processes. .PP .I Times\^ fails if .I buffer\^ points to an illegal address. .SM \%[EFAULT] .SH RETURN VALUE Upon successful completion, .I times\^ returns the elapsed real time, in 60ths of a second, since an arbitrary point in the past (e.g., system start-up time). This point does not change from one invocation of .I times\^ to another. If .I times\^ fails, a \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" exec(2), fork(2), time(2), wait(2). .\" @(#)times.2 1.5 n\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 7\(fm\(fm\^\(mu5.4\(fm\(fm. .TP .BI \&.SH "\h#|\nxu#\f1[\fPn\f1]\fP \f1[\fPi\f1]\fP \f1[\fPd\f1]\fP" Same as .BR \&.VS , except that foil size is 7\(fm\(fm\^\(mu9\(fm\(fm. .TP .BI \&.A "\h#|\nxu#\f1[\fPx\f1]\fP" Place text that follows at the first indentation level (left margin); the presence of .I x\^ suppresses the \(12 line spacing from the preceding text. .TP .BI \&.B "\h#|\nxu#\f1[\fPm \f1[\fPs\f1] ]\fP" Place text that follows at the second indentation level; text is preceded by a mark; .I m\^ is the mark (default is a large bullet); .I s\^ is the increment or decrement to the point size of the mark with respect to the .I prevailing\^ point size (default is 0); if .I s\^ is 100, it causes the point size of the mark to be the same as that of the .I default\^ mark. .TP .BI \&.C "\h#|\nxu#\f1[\fPm \f1[\fPs\f1] ]\fP" Same as .BR \&.B , but for the third indentation level; default mark is a dash. .TP .BI \&.D "\h#|\nxu#\f.TH QUIZ 6 .SH NAME quiz \- test your knowledge .SH SYNOPSIS .B /usr/games/quiz [ .B \-i file ] [ .B \-t ] [ category1 category2 ] .SH DESCRIPTION .I Quiz\^ gives associative knowledge tests on various subjects. It asks items chosen from .I category1\^ and expects answers from .IR category2 , or vice versa. If no categories are specified, .I quiz\^ gives instructions and lists the available categories. .PP .I Quiz\^ tells a correct answer whenever you type a bare new-line. At the end of input, upon interrupt, or when questions run out, .I quiz\^ reports a score and terminates. .PP The .B \-t flag specifies ``tutorial'' mode, where missed questions are repeated later, and material is gradually introduced as you learn. .PP The .B \-i flag causes the named file to be substituted for the default index file. The lines of these files have the syntax: .PP .RS .nf .ta \w'alternate 'u line = category \f3new line\f1 \^|\^ category \f3:\f1 line category = alternate \^|\^ category \(bv alternate alternate = empty \^|\^ .TH ULIMIT 2 .SH NAME ulimit \- get and set user limits .SH SYNOPSIS .BR "long ulimit (" "cmd, newlimit" ) .br .BR int " cmd" ; .br .BR long " newlimit" ; .SH DESCRIPTION This function provides for control over process limits. The .I cmd\^ values available are: .TP 5 .B 1 Get the process's file size limit. The limit is in units of 512-byte blocks and is inherited by child processes. Files of any size can be read. .TP 5 .B 2 Set the process's file size limit to the value of .IR newlimit . Any process may decrease this limit, but only a process with an effective user .SM ID of superuser may increase the limit. .I Ulimit\^ fails and the limit remains unchanged if a process with an effective user .SM ID other than superuser attempts to increase its file size limit. .SM \%[EPERM] .TP 5 .B 3 Get the maximum possible break value. See .IR brk (2). .SH "RETURN VALUE" Upon successful completion, a non-negative value is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE 0 1[\fPm \f1[\fPs\f1] ]\fP" Same as .BR \&.B , but for the fourth indentation level; default mark is a small bullet. .TP .BI \&.T "\h#|\nxu#string" .I String\^ is printed as an over-size, centered title. .TP .BI \&.I "\h#|\nxu#\f1[\fPin\f1]\fP \f1[\fPa \f1[\fPx\f1] ]\fP" Change the current text indent (does not affect titles); .I in\^ is the indent (in inches unless dimensioned, default is 0); if .I in\^ is signed, it is an increment or decrement; the presence of .I a\^ invokes the .B \&.A macro (see below) and passes .I x\^ (if any) to it. .TP .BI \&.S "\h#|\nxu#\f1[\fPp\f1]\fP \f1[\fPl\f1]\fP" Set the point size and line length; .I p\^ is the point size (default is ``previous''); if .I p\^ is 100, the point size reverts to the .I initial\^ default for the current foil-start macro; if .I p\^ is signed, it is an increment or decrement (default is 18 for .BR \&.VS , .BR \&.VH , and .BR \&.SH, and 14 for the other foil-start macros); .I l\^ is the line length (in inches unless dimensioned; default is 4.2\(fm\(fm alternate primary primary = character \^|\^ \f3[\f1 category \f3]\f1 \^|\^ option option = \f3{\f1 category \f3}\f1 .fi .RE .DT .PP The first category on each line of an index file names an information file. The remaining categories specify the order and contents of the data in each line of the information file. Information files have the same syntax. Backslash .B \e is used as with .IR sh (1) to quote syntactically significant characters or to insert transparent new-lines into a line. When either a question or its answer is empty, .I quiz\^ will refrain from asking it. .SH FILES /usr/games/lib/quiz/index .br /usr/games/lib/quiz/\(** .SH BUGS The construct ``\f3a\^\(bv\^ab\f1'' doesn't work in an information file. Use ``\f3a{b}\f1''. .\" @(#)quiz.6 1.3 ALSO brk(2), write(2). .\" @(#)ulimit.2 1.4 for .BR \&.Vh , 3.8\(fm\(fm for .BR \&.Sh , 5\(fm\(fm for .BR \&.SH , and 6\(fm\(fm for the other foil-start macros). .TP .BI \&.DF "\h#|\nxu#n \|f \|\f1[\fPn \|f .\^.\^.\f1]\fP" Define font positions; may not appear within a foil's input text (i.e., it may only appear after all the input text for a foil, but before the next foil-start macro); .I n\^ is the position of font .IR f ; up to 4 .RI `` "n\ \|f\^" '' pairs may be specified; the first font named becomes the .I prevailing\^ font; the initial setting is .RB ( H is a synonym for .BR G ): .IP \&\*.DF 1 H 2 I 3 B 4 S .TP .BI \&.DV "\h#|\nxu#\f1[\fPa\f1]\fP \f1[\fPb\f1]\fP \f1[\fPc\f1]\fP \f1[\fPd\f1]\fP" Alter the vertical spacing between indentation levels; .I a\^ is the spacing for .BR \&.A , .I b\^ is for .BR \&.B , .I c\^ is for .BR \&.C , and .I d\^ is for .BR \&.D ; all non-null arguments must be dimensioned; null arguments leave the corresponding spacing unaffected; initial setting is: .IP \&\*.DV \*.5v \*.5v \*.5v 0v .TP .B0 .TH REVERSI 6 .SH NAME reversi \- a game of dramatic reversals .SH SYNOPSIS .B /usr/games/reversi [ [ .B \-r ] .I file\^ ] .SH DESCRIPTION .I Reversi\^ (also known as ``friends'', ``Chinese friends'' and ``Othello'') is played on an 8 by 8 board using two-sided tokens. Each player takes his turn by placing a token with his side up in an empty square. During the first four turns, players may only place tokens in the four central squares of the board. Subsequently, with each turn, a player .I must\^ capture one or more of his opponent's tokens. He does this by placing one of his tokens such that it and another of his tokens embrace a solid line of his opponent's horizontally, vertically or diagonally. Captured tokens are flipped over and thus can be recaptured. If a player cannot outflank his opponent he forfeits his turn. The play continues until the board is filled or until no more outflanking is possible. .PP In this game, your tokens are asterisks .RB ( \(** ) and the machine's are at-signs .RB ( @ ). You m.TH UMASK 2 .SH NAME umask \- set and get file creation mask .SH SYNOPSIS .PP .BR "int umask (" cmask ) .br .BR int " cmask" ; .SH DESCRIPTION .I Umask\^ sets the process's file mode creation mask to .I cmask\^ and returns the previous value of the mask. Only the low-order 9 bits of .I cmask\^ and the file mode creation mask are used. .SH "RETURN VALUE" The previous value of the file mode creation mask is returned. .SH SEE ALSO mkdir(1), sh(1), chmod(2), creat(2), mknod(2), open(2). .\" @(#)umask.2 1.3 I \&.U "\h#|\nxu#str1 \f1[\fPstr2\f1]\fP" Underline .I str1\^ and concatenate .I str2\^ (if any) to it. .PD .PP The last 4 macros in the above list do not cause a break; the .B \&.I macro causes a break only if it is invoked with more than one argument; all the other macros cause a break. .PP The macro package also recognizes the following upper-case synonyms for the corresponding lower-case .I troff\^ requests: .br \&\*.AD \*.BR \*.CE \*.FI \*.HY \*.NA \*.NF \*.NH \*.NX \*.SO \*.SP \*.TA \*.TI .PP The .B Tm string produces the trademark symbol. .PP The input tilde .RB (\^ ~ \^) character is translated into a blank on output. .PP See the references cited below for further details. .SH FILES /usr/lib/tmac/tmac.v .br /usr/lib/macros/vmca .SH SEE ALSO cw(1), eqn(1), mmt(1), tbl(1), troff(1). .br .IR "\*(6) Document Processing Guide" . .br .I "A Macro Package for View Graphs and Slides\^" by T.\ A.\ Dolotta and D.\ W.\ Smith. .SH BUGS The .B \&.VW and .B \&.SW foils are meant to be 9\(fm\(fm widove by typing in the row and column at which you want to place your token as two digits (1-8), optionally separated by blanks or tabs. You can also type in: .PD 0 .RS .TP .B c to continue the game after hitting break (this is only necessary if you interrupt the machine while it is deliberating), .TP .BR g " \fIn" to start .I reversi\^ playing against itself for the next .IR n "" moves (or until the break key is hit), .TP .B n to stop printing the board after each move, .TP .B o to start it up again, .TP .B p to print the board regardless, .TP .B q to quit (without dishonor), .TP .B s to print the score, and, as always, .TP .B ! to escape to the shell. \s-1CONTROL\s+1-\s-1D\s+1 gets you back. .RE .PD .PP .I Reversi\^ also recognizes several commands which are valid only at the start of the game, before any moves have been made. They are: .PD 0 .RS .TP .B f to let the machine go first. .TP .BR h " \fIn" to ask for a handicap of from one to four corner squares. If you're .I really\^ good, you can give th1 .TH UMOUNT 2 .SH NAME umount \- unmount a file system .SH SYNOPSIS .BR "int umount (" spec ) .br .BR "char \(**" spec ; .SH DESCRIPTION .I Umount\^ requests that a previously mounted file system contained on the block special device identified by .I spec\^ be unmounted. .I Spec\^ is a pointer to a pathname. After unmounting the file system, the directory upon which the file system was mounted reverts to its ordinary interpretation. .PP .I Umount\^ may be invoked only by the superuser. .PP .I Umount\^ fails if one or more of the following are true: .IP The process's effective user .SM ID is not superuser. .SM \%[EPERM] .IP .I Spec\^ does not exist. .SM \%[ENXIO] .IP .I Spec\^ is not a block special device. .SM \%[ENOTBLK] .IP .I Spec\^ is not mounted. .SM \%[EINVAL] .IP A file on .I spec\^ is busy. .SM \%[EBUSY] .IP .I Spec\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion a value of 0 is returned. Otherwise, a value of \-1 is returned and .I ee by 7\(fm\(fm high, but because the typesetter paper is generally only 8\(fm\(fm wide, they are printed 7\(fm\(fm wide by 5.4\(fm\(fm high and have to be enlarged by a factor of 9\(sl7 before use as viewgraphs; this makes them less useful. .\" @(#)mv.5 1.3 e machine a handicap by typing a negative number. .TP .BR l " \fIn" to set the amount of look-ahead used by the machine in searching for moves. Zero means none at all. Four is the default. Greater than six means you may fall asleep waiting for the machine to move. .TP .BR t " \fIn" to tell .I reversi\^ that you will only need .IR n "" seconds to consider each move. If you fail to respond in the allotted time, you forfeit your turn. .PD .RE .PP If .I reversi\^ is given a file name as an argument, it will checkpoint the game, move by move, by dumping the board onto .IR file . The .B \-r option will cause .I reversi\^ to restart the game from .I file\^ and continue logging. .SH DIAGNOSTICS ``\f3Illegal!\f1'' for an illegal move, and ``\f3Huh?\f1'' for a move that even the machine cannot understand. .\" @(#)reversi.6 1.4 rrno\^ is set to indicate the error. .SH "SEE ALSO" mount(2). .\" @(#)umount.2 1.4 1 .tr ~ .TH REGEXP 5 .SH NAME regexp \- regular expression compile and match routines .SH SYNOPSIS .B #define .SM .B INIT .br .B #define .SM .B GETC\*S(\|) .br .B #define .SM .B PEEKC\*S(\|) .br .B #define .SM .BR UNGETC\*S( c ) .br .B #define .SM .BR RETURN\*S( pointer ) .br .B #define .SM .BR ERROR\*S( val ) .PP .B "#include " .PP .BR "char \(**compile(" "instring, expbuf, endbuf, eof" ")" .br .BR "char \(**" "instring," " \(**" "expbuf," " \(**" "endbuf" ";" .PP .BR "int step(" "string, expbuf" ) .br .BR "char \(**" "string," " \(**" "expbuf" ; .SH DESCRIPTION .PP The following paragraphs describe general purpose regular expression matching routines in the form of .IR ed (1), defined in .BR /usr/include/regexp.h . Programs such as .IR ed (1), .IR sed (1), .IR grep (1), .IR bs "(1), and" .IR expr (1), which perform regular expression matching, use this source file. Therefore, only the \fIregexp\fR file need be changed t.TH SKY 6 .SH NAME sky \- obtain ephemerides .SH SYNOPSIS .B /usr/games/sky [ .B \-l ] .SH DESCRIPTION .I Sky\^ predicts the apparent locations of the Sun, the Moon, the planets out to Saturn, stars of magnitude at least 2.5, and certain other celestial objects. .I Sky\^ reads the standard input to obtain a \s-1GMT\s0 time typed on one line with blanks separating year, month number, day, hour, and minute; if the year is missing the current year is used. If a blank line is typed the current time is used. The program prints the azimuth, elevation, and magnitude of objects which are above the horizon at the ephemeris location of Murray Hill at the indicated time. The \f3\-\^l\fP flag causes it to ask for another location. .PP Placing a ``1'' input after the minute entry causes the program to print out the Greenwich Sidereal Time at the indicated moment and to print for each body its topographic right ascension and declination as well as its azimuth and elevation. Also, instead of the magnitude, the semidiameter .TH UNAME 2 .SH NAME uname \- get name of current operating system .SH SYNOPSIS .B #include .PP .BR "int uname (" name ) .br .BR "struct utsname \(**" name ; .SH DESCRIPTION .I Uname\^ stores information identifying the current system in the structure pointed to by .IR name . .PP .I Uname\^ uses the structure defined in \f3\fP whose members are: .PP .RS \f3char\f2 sysname\f1[9]; .br \f3char\f2 nodename\f1[9]; .br \f3char\f2 release\f1[9]; .br \f3char\f2 version\f1[9]; .br \f3char\f2 machine\f1[9]; .RE .PP .I Uname\^ returns a null-terminated character string naming the current system in the character array .IR sysname . Similarly, .I nodename\^ contains the name that the system is known by on a communications network. .I Release\^ and .I version\^ further identify the operating system. .I Machine\^ contains a standard name that identifies the hardware that the system is running on. .PP .I Uname\^ fails if .I name\^ points to an invalid address. .SM \%[EFAULT] .SH "RETURN VALUE" o maintain regular expression compatibility. .PP The interface to this file is unpleasantly complex. Programs that include this file must have the following 5 macros declared before the .BR "#include~ " statement. These macros are used by the .I compile\^ routine. .TP 20 .SM \f3GETC\*S(\|)\f1 Return the value of the next character in the regular expression pattern. Successive calls to .SM \f3GETC\*S(\|)\f1 should return successive characters of the regular expression. .TP 20 .SM \f3PEEKC\*S(\|)\f1 Return the next character in the regular expression. Successive calls to .SM \f3PEEKC\*S(\|)\f1 should return the same character (which should also be the next character returned by \f3\s-1GETC\s0(\|)\f1). .TP 20 .SM .BI UNGETC\*S( c ) Cause the argument .I c\^ to be returned by the next call to .SM \f3GETC\*S(\|)\f1 (and \f3\s-1PEEKC\s0(\|)\f1). No more that one character of pushback is ever needed and this character is guaranteed to be the last character read by \f3\s-1GETC(\|)\s0\f1. The value of the ma2 of the body, in seconds of arc, is reported. .PP A ``2'' after the minute entry makes the coordinate system geocentric. .PP The effects of atmospheric extinction on magnitudes are not included; the brightest magnitudes of variable stars are marked with \(**. .PP For all bodies, the program takes into account precession and nutation of the equinox, annual (but not diurnal) aberration, diurnal parallax, and the proper motion of stars. In no case is refraction included. .PP The program takes into account perturbations of the Earth due to the Moon, Venus, Mars, and Jupiter. The expected accuracies are: for the Sun and other stellar bodies a few tenths of seconds of arc; for the Moon (on which particular care is lavished) likewise a few tenths of seconds. For the Sun, Moon and stars the accuracy is sufficient to predict the circumstances of eclipses and occultations to within a few seconds of time. The planets may be off by several minutes of arc. .PP There are lots of special options not described here, which do Upon successful completion, a non-negative value is returned. Otherwise, \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO uname(1). .\" @(#)uname.2 1.5 .\" @(#)cos.3m 1.2 .so /usr/man/u_man/man3/trig.3m .TH PASTE 1 .SH NAME paste \- merge same lines of several files or subsequent lines of one file .SH SYNOPSIS \f3paste \fPfile1 file2 .\|.\|. .br \f3paste \-d\fP\|list file1 file2 .\|.\|. .br \f3paste \-s [\-d\fP\|list\|\f3] \fPfile1 file2 .\|.\|. .SH DESCRIPTION In the first two forms, .I paste\^ concatenates corresponding lines of the given input files .IR file1 , .IR file2 , etc. It treats each file as a column or columns of a table and pastes them together horizontally (parallel merging). .I Paste is the counterpart of .IR cat (1) which concatenates vertically, i.e., one file after the other. In the last form above, .I paste\^ subsumes the function of an older command with the same name by combining subsequent lines of the input file (serial merging). In all cases, lines are glued together with the .I tab\^ character, or with characters from an optionally specified .IR list . Output is to the standard output, so it can be used as the start of a pipe, or as a filter, if \f3\-\fP is used in place of a filena2 .TH UNLINK 2 .SH NAME unlink \- remove directory entry .SH SYNOPSIS .BR "int unlink (" path ) .br .BR "char \(**" path ; .SH DESCRIPTION .I Unlink\^ removes the directory entry named by the pathname pointed to by .IR path . .PP The named file is unlinked unless one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP The named file does not exist. .SM \%[ENOENT] .IP Search permission is denied for a component of the path prefix. .SM \%[EACCES] .IP Write permission is denied on the directory containing the link to be removed. .SM \%[EACCES] .IP The named file is a directory and the effective user .SM ID of the process is not superuser. .SM \%[EPERM] .IP The entry to be unlinked is the mount point for a mounted file system. .SM \%[EBUSY] .IP The entry to be unlinked is the last link to a pure procedure (shared text) file that is being executed. .SM \%[ETXTBSY] .IP The directory entry to be unlinked is part of a read-only file system. .SM \%[EROFS] .IP .I.TH COSH 3F .SH NAME cosh, dcosh \- FORTRAN hyperbolic cosine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = cosh(" "r1" ")" .P .RB "dp2" " = dcosh(" "dp1" ")" .RB "dp2" " = cosh(" "dp1" ")" .SH DESCRIPTION .I Cosh\^ returns the real hyperbolic cosine of its real argument. .I Dcosh\^ returns the double-precision hyperbolic cosine of its double-precision argument. The generic form .I cosh\^ may be used to return the hyperbolic cosine in the type of its argument. .SH SEE ALSO sinh(3M). .\" @(#)cosh.3f 1.4 me. .PP The meanings of the options are: .TP .B "\-d" Replace the .I tab\^ character by one or more alternate characters specified in .IR list . Without this option, the new-line characters of each but the last file (or last line in case of the .B \-s option) are replaced by a .I tab\^ character. .TP .I "list\^" One or more characters immediately following .B \-d replace the default .I tab\^ as the line concatenation character. The list is used circularly; i.e., when exhausted, it is reused. In parallel merging (i.e., no .B \-s option), the lines from the last file are always terminated with a new-line character, not from the .IR list . The list may contain the special escape sequences: .B \e\|n (new line), .B \e\|t (tab), .B \e\e (backslash), and .B \e\|0 (empty string, not a null character). Quoting may be necessary if characters have special meaning to the shell (e.g., to get one backslash, use .B \-d\|``\e\e\e\e'' ). .TP .B "\-s" Merge subsequent lines rather than one from each input file. Use .I tab\^ fo Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .PP When all links to a file have been removed and no process has the file open, the space occupied by the file is freed and the file ceases to exist. If one or more processes have the file open when the last link is removed, the removal is postponed until all references to the file have been closed. .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" rm(1), close(2), link(2), open(2). .\" @(#)unlink.2 1.4 3 .\" @(#)cosh.3m 1.2 .so /usr/man/u_man/man3/sinh.3m r concatenation, unless a .I list\^ is specified with the .B \-d option. Regardless of the .IR list , the last character of the file is forced to be a new line. .TP .B "\-" May be used in place of any filename, to read a line from the standard input. (There is no prompting). .SH EXAMPLES .TP 15m \f3ls \|\(bv\| paste \|\-d``\|'' \|\-\f1 list directory in one column .TP \f3ls \|\(bv\| paste \|\- \|\- \|\- \|\-\f1 list directory in four columns .TP \f3paste \|\-s \|\-d``\e\|t\e\|n'' \|file\f1 combine pairs of lines into lines .SH "SEE ALSO" grep(1), cut(1), .br pr(1): .BR "pr \-t \-m" .\|.\|. works similarly, but creates extra blanks, tabs and new lines for a nice page layout. .SH DIAGNOSTICS .TP 17 .B "line too long\^" Output lines are restricted to 511 characters. .TP 17 .B "too many files\^" Except for the .B \-s option, no more than 12 input files may be specified. .\" @(#)paste.1 1.6 .TH USTAT 2 .SH NAME ustat \- get file system statistics .SH SYNOPSIS .B #include .br .B #include .sp .BR "int ustat (" "dev, buf" ) .br .BR int " dev" ; .br .BR "struct ustat \(**" buf ; .SH DESCRIPTION .I Ustat\^ returns information about a mounted file system. .I Dev\^ is a device number identifying a device containing a mounted file system. .I Buf\^ is a pointer to a .I ustat\^ structure that includes the following elements: .PP .RS .nf .ta 8n 25n 30n \f3daddr_t\f2 f_tfree\f3;\f1 /\(** Total free blocks \(**/ \f3ino_t\f2 f_tinode\f3;\f1 /\(** Number of free inodes \(**/ \f3char\f2 f_fname[6]\f3;\f1 /\(** Filsys name \(**/ \f3char\f2 f_fpack[6]\f3;\f1 /\(** Filsys pack name \(**/ .fi .RE .PP .I Ustat\^ fails if one or more of the following are true: .IP .I Dev\^ is not the device number of a device containing a mounted file system. .SM \%[EINVAL] .IP .I Buf\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value o.TH CRYPT 3C .SH NAME crypt, encrypt \- a one way hashing encryption algorithm .SH SYNOPSIS .nf .BR "char \(**crypt (" "key, salt" ")" .BR "char \(**" "key," " \(**" "salt" ; .PP .BR "void encrypt (" "block" ) .BR "char \(**" "block" ; .SH DESCRIPTION .I Crypt\^ is the password encryption function. It is based on a one way hashing encryption algorithm with variations intended (among other things) to frustrate use of hardware implementations of a key search. .PP .I Key\^ is a user's typed password. .I Salt\^ is a two-character string chosen from the set [\f3a-zA-Z0-9./\fP]; this string is used to perturb the hashing algorithm in one of 4096 different ways, after which the password is used as the key to encrypt repeatedly a constant string. The returned value points to the encrypted password. The first two characters are the salt itself. .PP There is a character array of length 64 containing only the characters with numerical value 0 and 1. When this string is divided into groups of 8, the low-order bit in each3 .\" @(#)pcat.1 1.2 .so /usr/man/u_man/man1/pack.1 f 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" stat(2), fs(4). .\" @(#)ustat.2 1.6  group is ignored; this gives a 56-bit key which is set into the machine by \f2crypt\f1. .PP The .I encrypt\^ entry provides (rather primitive) access to the actual hashing algorithm. The argument to the .I encrypt\^ entry is a character array of length 64 containing only the characters with numerical value of 0 and 1. The argument array is modified in place to a similar array representing the bits of the argument after having been subjected to the hashing algorithm using the key set by .IR crypt . .SH SEE ALSO getpass(3C), passwd(4), login(1), passwd(1). .SH BUGS The return value points to static data that are overwritten by each call. .\" @(#)encrypt.3c 1.1 of 12/15/83 .\" @(#)pcc.1 1.2 .so /usr/man/u_man/man1/cc.1 4 .TH UTIME 2 .SH NAME utime \- set file access and modification times .SH SYNOPSIS .B #include .br .BR "int utime (" "path, times" ) .br .BR "char \(**" path ; .br .BR "struct utimbuf \(**" times ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. .I Utime\^ sets the access and modification times of the named file. .PP If .I times\^ is .SM .BR NULL , the access and modification times of the file are set to the current time. A process must be the owner of the file or have write permission to use .I utime\^ in this manner. .PP If .I times\^ is not .SM .BR NULL , .I times\^ is interpreted as a pointer to a .I utimbuf\^ structure and the access and modification times are set to the values contained in the designated structure. Only the owner of the file or the superuser may use .I utime\^ this way. .PP The times in the following structure are measured in seconds since 00:00:00 .SM GMT\*S, Jan. 1, 1970. .PP .RS .nf .ta .5i 1i 1.75i 2.5i \f3struct\f2 utimbuf\f3 {\f1 \f3time_t\f2 actime\f3;.\" @(#)csin.3f 1.2 .so /usr/man/u_man/man3/sin.3f 2630-*'$!  \f1 /\(** access time \(**/ \f3time_t\f2 modtime\f3;\f1 /\(** modification time \(**/ \f3};\f1 .fi .RE .PP .PP .I Utime\^ fails if one or more of the following are true: .IP The named file does not exist. .SM \%[ENOENT] .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP Search permission is denied by a component of the path prefix. .SM \%[EACCES] .IP The effective user .SM ID is not superuser and not the owner of the file and .I times\^ is not .SM .BR NULL . .SM \%[EPERM] .IP The effective user .SM ID is not superuser and not the owner of the file, .I times\^ is .SM .BR NULL , and write access is denied. .SM \%[EACCES] .IP The file system containing the file is mounted read-only. .SM \%[EROFS] .IP .I Times\^ is not .SM .B NULL and points outside the process's allocated address space. .SM \%[EFAULT] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is retu4 .\" @(#)csqrt.3f 1.2 .so /usr/man/u_man/man3/sqrt.3f .TH PR 1 .SH NAME pr \- print files .SH SYNOPSIS .B pr [ options ] [ files ] .SH DESCRIPTION .I Pr\^ prints the named files on the standard output. If .I file\^ is .BR \- , or if no files are specified, the standard input is assumed. By default, the listing is separated into pages, each headed by the page number, a date and time, and the name of the file. .PP By default, columns are of equal width, separated by at least one space; lines which do not fit are truncated. If the .B \-s option is used, lines are not truncated and columns are separated by the separation character. .PP If the standard output is associated with a terminal, error messages are withheld until .I pr\^ has completed printing. .PP The \fIoptions\fP below may appear singly or be combined in any order: .TP .BI + k\^ Begin printing with page .I k\^ (default is 1). .TP .BI \- k\^ Produce .IR k -column output (default is 1). The options .B \-e and .B \-i are assumed for multi-column output. .TP .B \-a Print multi-column output across the page. rned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" stat(2). .\" @(#)utime.2 1.6 .TH CTERMID 3S .SH NAME ctermid \- generate filename for terminal .SH SYNOPSIS .B #include .PP .BR "char \(**ctermid(" s ) .br .BR "char \(**" s ; .SH DESCRIPTION .I Ctermid\^ generates the pathname of the controlling terminal for the current process, and stores it in a string. .PP If .I s\^ is a .SM NULL pointer, the string is stored in an internal static area, the contents of which are overwritten at the next call to .IR ctermid , and the address of which is returned. Otherwise, .I s\^ is assumed to point to a character array of at least .B L_ctermid elements; the pathname is placed in this array and the value of .I s\^ is returned. The constant .B L_ctermid is defined in the .B header file. .SH NOTES The difference between .I ctermid\^ and .IR ttyname (3C) is that .I ttyname\^ must be handed a file descriptor and returns the actual name of the terminal associated with that file descriptor, while .I ctermid\^ returns a string .RB ( /dev/tty ) that refers to the terminal if used as a fil5 .TP .B \-m Merge and print all files simultaneously, one per column (overrides the \f3\-\fP\fIk\fP, and .B \-a options). .TP .B \-d Double-space the output. .TP .BI \-e ck\^ Expand .I input\^ tabs to character positions .IR k "+1, 2\(**" k "+1, 3\(**" k +1, etc. If .I k\^ is 0 or is omitted, default tab settings at every eighth position are assumed. Tab characters in the input are expanded into the appropriate number of spaces. If .I c\^ (any non-digit character) is given, it is treated as the input tab character (default for .I c\^ is the tab character). .TP .BI \-i ck\^ In .IR output , replace white space wherever possible by inserting tabs to character positions .IR k "+1, 2\(**" k "+1, 3\(**" k +1, etc. If .I k\^ is 0 or is omitted, default tab settings at every eighth position are assumed. If .I c\^ (any non-digit character) is given, it is treated as the output tab character (default for .I c\^ is the tab character). .TP .BI \-n ck\^ Provide .IR k -digit line numbering (default for .I k\^ is 5). The num.TH WAIT 2 .SH NAME wait \- wait for child process to stop or terminate .SH SYNOPSIS .BR "int wait (" stat_loc ) .br .BR "int \(**" stat_loc ; .PP .B int wait ((int \(**)0) .SH DESCRIPTION .I Wait\^ suspends the calling process until it receives a signal that is to be caught (see .IR signal (2)), or until any one of the calling process's child processes stops in a trace mode (see .IR ptrace (2)) or terminates. If a child process stopped or terminated prior to the call on .IR wait , return is immediate. .PP If .I stat_loc\^ (taken as an integer) is non-zero, 16 bits of information called \fIstatus\fP are stored in the low-order 16 bits of the location pointed to by .IR stat_loc . .I Status\^ can be used to differentiate between stopped and terminated child processes. If the child process terminated, \fIstatus\fP identifies the cause of termination and passes useful information to the parent. This is accomplished in the following manner: .IP If the child process stopped, the high-order 8 bits of \fIstatus\fP cename. For this reason, .I ttyname\^ is useful only if the process already has at least one file open to a terminal. .SH SEE ALSO ttyname(3C). .\" @(#)ctermid.3s 1.5 ber occupies the first .IR k +1 character positions of each column of normal output or each line of .B \-m output. If .I c\^ (any non-digit character) is given, it is appended to the line number to separate it from whatever follows (default for .I c\^ is a tab). .TP .BI \-w k\^ Set the width of a line to .I k\^ character positions (default is 72 for equal-width multi-column output, no limit otherwise). .TP .BI \-o k\^ Offset each line by .I k\^ character positions (default is 0). The number of character positions per line is the sum of the width and offset. .TP .BI \-l k\^ Set the length of a page to .I k\^ lines (default is 66). .TP .B \-h Use the next argument as the header to be printed instead of the filename. .TP .B \-p Pause before beginning each page if the output is directed to a terminal .RI ( pr\^ will ring the bell at the terminal and wait for a carriage return). .TP .B \-f Use form-feed character for new pages (default is to use a sequence of line feeds). Pause before beginning the first page if t5 ontain the number of the signal that caused the process to stop and the low-order 8 bits are set equal to 0177. .IP If the child process terminated due to an .I exit\^ call, the low-order 8 bits of \fIstatus\fP are zero and the high-order 8 bits contain the low-order 8 bits of the argument that the child process passed to .IR exit ; see .IR exit (2). .IP If the child process terminated due to a signal, the high-order 8 bits of \fIstatus\fP are zero and the low-order 8 bits contain the number of the signal that caused the termination. In addition, if the low-order seventh bit (i.e., bit 200) is set, a ``core image'' will have been produced; see .IR signal (2). .PP If a parent process terminates without waiting for its child processes to terminate, the parent process .SM ID of each child process is set to 1. This means the initialization process inherits the child processes; see .IR intro (2). .PP .PP .I Wait\^ fails and returns immediately if one or more of the following are true: .IP The calling process has n.TH CTIME 3C .SH NAME ctime, localtime, gmtime, asctime, tzset \- convert date and time to string .SH SYNOPSIS .nf .B #include .PP .BR "char \(**ctime (" clock ) .BR "long \(**" clock ; .PP .BR "struct tm \(**localtime (" clock ) .BR "long \(**" clock ; .PP .BR "struct tm \(**gmtime (" clock ) .BR "long \(**" clock ; .PP .BR "char \(**asctime (" tm ) .BR "struct tm \(**" tm ; .PP .B extern long timezone; .PP .B extern int daylight; .PP .B extern char \(**tzname[2]; .PP .B void tzset ( ) .SH DESCRIPTION .I Ctime\^ converts a long integer, pointed to by .IR clock , representing the time in seconds since 00:00:00 GMT, January 1, 1970, and returns a pointer to a 26-character string in the following form. All the fields have constant width. .PP .RS Sun Sep 16 01:03:52 1973\\n\\0 .RE .PP .I Localtime\^ and .I gmtime\^ return pointers to .I tm\^ structures, described below. .I Localtime\^ corrects for the time zone and possible Daylight Savings Time; .I gmtime\^ converts directly to Greenwich Mean Time (\s-he standard output is associated with a terminal. .TP .B \-r Print no diagnostic reports on failure to open files. .TP .B \-t Print neither the 5-line identifying header nor the 5-line trailer normally supplied for each page. Quit printing after the last line of each file without spacing to the end of the page. .TP .BI \-s c\^ Separate columns by the single character .I c\^ instead of by the appropriate number of spaces (default for .I c\^ is a tab). .SH EXAMPLES Print .B file1 and .B file2 as a double-spaced, three-column listing headed by ``file list'': .PP .RS .B "pr \|\-3dh \|"file \|list" \|file1 \|file2" .RE .PP Write .B file1 on .BR file2 , expanding tabs to columns 10, 19, 28, 37, .\|.\|. : .PP .RS .B "pr \|\-e9 \|\-t \|file2" .RE .SH FILES /dev/tty\(** to suspend messages .SH SEE ALSO cat(1). .\" @(#)pr.1 1.5 o existing unwaited-for child processes. .SM \%[ECHILD] .IP .I Stat_loc\^ points to an illegal address. .SM \%[EFAULT] .SH RETURN VALUE If .I wait\^ returns due to the receipt of a signal, a value of \-1 is returned to the calling process and .I errno\^ is set to .SM EINTR. If .I wait\^ returns due to a stopped or terminated child process, the process .SM ID of the child is returned to the calling process. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" exec(2), exit(2), fork(2), pause(2), signal(2). .SH WARNING See .SM .I WARNING\^ in .IR signal (2). .\" @(#)wait.2 1.4 6 1GMT\s0), which is the time the system uses. .PP .I Asctime\^ converts a \fItm\fP structure to a 26-character string, as shown in the above example, and returns a pointer to the string. .PP Declarations of all the functions and externals, and the .I tm\^ structure, are in the .I \^ header file. The structure declaration is: .RS .PP .nf \f3struct tm {\f1 \f3int tm_sec;\f1 /\(** seconds (0 - 59) \(**/ \f3int tm_min;\f1 /\(** minutes (0 - 59) \(**/ \f3int tm_hour;\f1 /\(** hours (0 - 23) \(**/ \f3int tm_mday;\f1 /\(** day of month (1 - 31) \(**/ \f3int tm_mon;\f1 /\(** month of year (0 - 11) \(**/ \f3int tm_year;\f1 /\(** year \- 1900 \(**/ \f3int tm_wday;\f1 /\(** day of week (Sunday = 0) \(**/ \f3int tm_yday;\f1 /\(** day of year (0 - 365) \(**/ \f3int tm_isdst;\f1 \f3};\f1 .fi .RE .PP .I Tm_isdst\^ is non-zero if Daylight Savings Time is in effect. .PP The external .B long variable .I timezone\^ contains the difference,.TH PROF 1 .SH NAME prof \- display profile data .SH SYNOPSIS .B prof .RB [ \-tcan ] .RB [ \-ox ] .RB [ \-g ] .RB [ \-z ] .RB [ \-h ] .RB [ \-s ] .RB [ \-m "\ mdata]" [prog] .SH DESCRIPTION .I Prof\^ interprets the profile file produced by the .IR monitor (3C) function. The symbol table in the object file .I prog\^ .RB ( a.out by default) is read and correlated with the profile file .RB ( mon.out by default). For each external text symbol the percentage of time spent executing between the address of that symbol and the address of the next is printed, together with the number of times that function was called and the average number of milliseconds per call. .PP The mutually exclusive options .B t, c, a,\^ and .B n\^ determine the type of sorting of the output lines: .TP .B \-t Sort by decreasing percentage of total time (default). .TP .B \-c Sort by decreasing number of calls. .TP .B \-a Sort by increasing symbol address. .TP .B \-n Sort lexically by symbol name. .PP The mutually exclusive options .B o\^ and ..TH WRITE 2 .SH NAME write \- write on a file .SH SYNOPSIS .BR "int write (" "fildes, buf, nbyte" ) .br .BR int " fildes" ; .br .BR "char \(**" buf ; .br .BR unsigned " nbyte" ; .SH DESCRIPTION .I Fildes\^ is a file descriptor obtained from a .IR creat (2), .IR open (2), .IR dup (2), .IR fcntl (2), or .IR pipe (2) system call. .PP .I Write\^ attempts to write .I nbyte\^ bytes from the buffer pointed to by .I buf\^ to the file associated with the .IR fildes . .PP On devices capable of seeking, the actual writing of data proceeds from the position in the file indicated by the file pointer. Upon return from .IR write , the file pointer is incremented by the number of bytes actually written. .PP On devices incapable of seeking, writing always takes place starting at the current position. The value of a file pointer associated with such a device is undefined. .PP If the .SM .B O_APPEND file status flag is set, the file pointer is set to the end of the file prior to each write. .PP .I Write\^ fails and the file p in seconds, between \s-1GMT\s0 and local standard time (in \s-1EST\s0, .I timezone\^ is 5\(**60\(**60); the external variable .I daylight\^ is non-zero if, and only if, the standard \s-1U.S.A.\s+1 Daylight Savings Time conversion should be applied. The program knows about the peculiarities of this conversion in 1974 and 1975; if necessary, a table for these years can be extended. .PP If an environment variable named .SM .B TZ is present, .I asctime\^ uses the contents of the variable to override the default time zone. The value of .SM .B TZ must be a 3-letter time zone name, followed by a number representing the difference between local time and Greenwich Mean Time in hours, followed by an optional 3-letter name for a daylight time zone. For example, the setting for New Jersey would be .SM .BR EST5EDT . The effects of setting .SM .B TZ are thus to change the values of the external variables .I timezone\^ and .IR daylight ; in addition, the time zone names contained in the external variable .PP .B char \(**6 B x\^ specify the printing of the address of each symbol monitored: .TP .B \-o Print each symbol address (in octal) along with the symbol name. .TP .B \-x Print each symbol address (in hexadecimal) along with the symbol name. .PP The following options may be used in any combination: .TP .B \-g Include non-global symbols (static functions). .TP .B \-z Include all symbols in the profile range (see .IR monitor (3C)), even if associated with zero number of calls and zero time. .TP .B \-h Suppress the heading normally printed on the report. (This is useful if the report is to be processed further.) .TP .B \-s Print a summary of several of the monitoring parameters and statistics on the standard error output. .TP .BR \-m " mdata\^" Use file .I mdata\^ instead of .B mon.out for profiling data. .PP For the number of calls to a function to be tallied, the .B \-p option of .IR cc (1) must have been given when the file containing the function was compiled. This option to the .I cc\^ command also arranges for the object ointer remains unchanged if one or more of the following are true: .IP .I Fildes\^ is not a valid file descriptor open for writing. .SM \%[EBADF] .IP An attempt is made to write to a pipe that is not open for reading by any process. .SM \%[EPIPE and .SM SIGPIPE signal] .IP An attempt is made to write a file that exceeds the process's file size limit or the maximum file size. See .IR ulimit (2). .SM \%[EFBIG] .IP .I Buf\^ points outside the process's allocated address space. .SM \%[EFAULT] .PP If a .I write\^ requests that more bytes be written than there is room for (e.g., the .I ulimit\^ (see .IR ulimit (2)) or the physical end of a medium), only as many bytes as there is room for are written. For example, if there is space for 20 bytes more in a file before reaching a limit, a write of 512 bytes returns 20. The next write of a non-zero number of bytes gives a failure return (except as noted below). .PP If the file being written is a pipe (or .SM FIFO\*S), no partial writes are permitted. Thus, the write ftzname[2] = { "\s-1EST\s0", "\s-1EDT\s0" }; .PP are set from the environment variable .SM .BR TZ . The function .I tzset\^ sets these external variables from .SM .BR TZ ; .I tzset\^ is called by .I asctime\^ and may also be called explicitly by the user. .PP .PP Note that in most installations, .SM .B TZ is set by default when the user logs on, to a value in the local \f3/etc/profile\f1 file (see .IR profile (4)). .SH "SEE ALSO" time(2), getenv(3C), profile(4), environ(5). .SH BUGS The return values point to static data whose content is overwritten by each call. .\" @(#)ctime.3c 1.7 file to include a special profiling start-up function that calls .IR monitor (3C) at the beginning and end of execution. It is the call to .I monitor\^ at the end of execution that causes the .B mon.out file to be written. Thus, only programs that call .IR exit (2) or return from .I main\^ cause the .B mon.out file to be produced. .SH FILES .ta \w'mon.out 'u mon.out for profile .br a.out for namelist .SH "SEE ALSO" cc(1), nm(1), exit(2), profil(2), monitor(3C). .br .ne 6v .SH BUGS There is a limit of 600 functions that may have call counters established during program execution. If this limit is exceeded, other data is overwritten and the .B mon.out file is corrupted. The number of call counters used is reported automatically by the .I prof\^ command whenever the number exceeds 250. .\" @(#)prof.1 1.4 7 ails if a write of .I nbyte\^ bytes would exceed a limit. .PP If the file being written is a pipe (or .SM FIFO\*S) and the .SM .B O_NDELAY flag of the file flag word is set, then write to a full pipe (or .SM FIFO\*S) returns a count of 0. If .SM .B O_NDELAY is clear, writes to a full pipe (or .SM FIFO\*S) block until space becomes available. .SH "RETURN VALUE" Upon successful completion the number of bytes actually written is returned. Otherwise, \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" creat(2), dup(2), lseek(2), open(2), pipe(2), ulimit(2). .\" @(#)write.2 1.5 .TH CTYPE 3C .SH NAME isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii \- classify characters .SH SYNOPSIS .B #include .PP .BR "int isalpha (" c ) .br .BR int " c" ; .PP .B . . . .SH DESCRIPTION These macros classify character-coded integer values by table lookup. Each is a predicate returning nonzero for true, zero for false. .I Isascii\^ is defined on all integer values; the rest are defined only where .I isascii\^ is true and on the single non-\s-1ASCII\s0 value .SM .B EOF (\-1); see .IR stdio (3S)). .TP 15n .I isalpha\^ .I c\^ is a letter. .TP .I isupper\^ .I c\^ is an uppercase letter. .TP .I islower\^ .I c\^ is a lowercase letter. .TP .I isdigit\^ .I c\^ is a digit [0-9]. .TP .I isxdigit\^ .I c\^ is a hexadecimal digit [0-9], [A-F] or [a-f]. .TP .I isalnum\^ .I c\^ is an alphanumeric (letter or digit). .TP .I isspace\^ .I c\^ is a space, tab, carriage return, new line, vertical tab, or form feed. .TP .I ispunct\^ .I c\^ is a punctuat'\" t .tr ~ .nr f 0 .bd S B 3 .de SP .if n .ul \%[\f3\-\\$1\fP\\c .if n .ul 0 \\$2\\$3 .. .de SF .if n .ul \%[\f3\-\\$1\fP] .if n .ul 0 .. .de AR .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \f3\-\\$1\\fP \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .de A1 .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \f3\-\\$1\fP[\f2\\$2\^\fP] \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .ds S) \s-1SCCS\s+1 .ds I) \s-1SID\s+1 .TH PRS 1 .SH NAME prs \- print an \s-1SCCS\s+1 file .SH SYNOPSIS .B prs .SP d [dataspec]] .SP r [\s-1SID\s+1]] .SF e .SF l .SF a files .SH DESCRIPTION .I Prs\^ prints, on the standard output, parts or all of an \*(S) file (see .IR sccsfile (4)) in a user supplied format. If a directory is named, .I prs\^ behaves as though each file in the directory were specified as a named file, except that non-\*(S) files (last component of the pathname does not begin with \f3s.\fP), and unreadable files are silently ignored. If a name of \f3\-\fP is given, the standard input is read; each l..._tolower.3c_toupper.3ca64l.3cabort.3cabort.3fabs.3cabs.3facos.3facos.3maimag.3faint.3falog.3falog10.3famax0.3famax1.3famin0.3famin1.3famod.3fand.3fanint.3fasctime.3casin.3fasin.3massert.3xatan.3fatan.3matan2.3fatan2.3matof.3catoi.3catol.3cbessel.3mbool.3fbsearch.3ccabs.3fcalloc.3cccos.3fceil.3mcexp.3fchar.3fclearerr.3sclock.3cclog.3fcmplx.3fconjg.3fconv.3ccos.3fcos.3mcosh.3fcosh.3mcrypt.3ccsin.3fcsqrt.3fctermid.3sctime.3cctype.3ccuserid.3sdabs.3fdacos.3fdasin.3fdatan.3fdatan2.3f7 ion character (neither control nor alphanumeric). .TP .I isprint\^ .I c\^ is a printing character, code 040 (space) through 0176 (tilde). .TP .I isgraph\^ .I c\^ is a printing character, similar to .I isprint\^ except false for space. .TP .I iscntrl\^ .I c\^ is a delete character (0177) or an ordinary control character (less than 040). .TP .I isascii\^ .I c\^ is an \s-1ASCII\s0 character, code less than 0200. .SH DIAGNOSTICS If the argument to any of these macros is not in the domain of the function, the result is undefined. .SH "SEE ALSO" ascii(5). .\" @(#)ctype.3c 1.5 ine of the standard input is taken to be the name of an \*(S) file or directory to be processed; non-\*(S) files and unreadable files are silently ignored. .PP Arguments to .IR prs , which may appear in any order, consist of .I keyletter\^ arguments, and filenames. .PP All the described .I keyletter\^ arguments apply independently to each named file: .A1 d dataspec Used to specify the output data specification. The .I dataspec\^ is a string consisting of \*(S) file .I "data keywords\^" (see .IR "\s-1DATA KEYWORDS\s+1" ) interspersed with optional user supplied text. .A1 r \s-1SID\s+1 Used to specify the .IR S "\s-1CCS\s+1 " ID entification (\*(I)) string of a delta for which information is desired. If no \*(I) is specified, the \*(I) of the most recently created delta is assumed. .AR e Requests information for all deltas created .I earlier\^ than and including the delta designated via the .B \-r keyletter. .AR l Requests information for all deltas created .I later\^ than and including the delta designated via.\" @(#)_tolower.3c 1.2 .so /usr/man/u_man/man3/conv.3c .TH CUSERID 3S .SH NAME cuserid \- get character login name of the user .SH SYNOPSIS .B #include .PP .BR "char \(**cuserid (" s ) .br .BR "char \(**" s ; .SH DESCRIPTION .I Cuserid\^ generates a character-string representation of the login name of the owner of the current process. If .I s\^ is a .SM NULL pointer, this representation is generated in an internal static area, the address of which is returned. Otherwise, .I s\^ is assumed to point to an array of at least .B L_cuserid characters; the representation is left in this array. The constant .B L_cuserid is defined in the .B header file. .SH DIAGNOSTICS If the login name cannot be found, .I cuserid\^ returns a .SM NULL pointer; if .I s\^ is not a .SM NULL pointer, a null character .B (\e0) is placed at .IR s[0] . .SH SEE ALSO getlogin(3C), getpwent(3C). .\" @(#)cuserid.3s 1.4 8  the .B \-r keyletter. .AR a Requests printing of information for both removed (i.e., delta type = .IR R ; (see .IR rmdel (1)) and existing (i.e., delta type = .IR D) deltas. If the .B \-a keyletter is not specified, information for existing deltas only is provided. .PP .i0 .SH "DATA KEYWORDS" Data keywords specify which parts of an \*(S) file are to be retrieved and output. All parts of an \*(S) file (see .IR sccsfile (4)) have an associated data keyword. There is no limit on the number of times a data keyword may appear in a .IR dataspec . .PP The information printed by .I prs\^ consists of: (1) the user supplied text; and (2) appropriate values (extracted from the \*(S) file) substituted for the recognized data keywords in the order of appearance in the \f2dataspec\^\fP. The format of a data keyword value is either .I Simple\^ (S), in which keyword substitution is direct, or .I "Multi-line\^" (M), in which keyword substitution is followed by a carriage return. .PP User supplied text is any text other tha.\" @(#)_toupper.3c 1.2 .so /usr/man/u_man/man3/conv.3c .\" @(#)dabs.3f 1.2 .so /usr/man/u_man/man3/abs.3f n recognized data keywords. A tab is specified by \f3\e\|t\fP and carriage return/new line is specified by \f3\e\|n\fP. .bp .ce SCCS FILES DATA KEYWORDS .DS .PD 0 .if t .vs -1p .if n .ll 66 .if t .ll 6.5i .TS center ; c c c c c c l c c c . .sp KEYWORD DATA ITEM FILE SECTION VALUE FORMAT _ \f3:\fPDt\f3:\fP Delta information Delta Table See below* S \f3:\fPDL\f3:\fP T{ Delta line statistics T} " \f3:\fPLi\f3:\fP/\f3:\fPLd\f3:\fP/\f3:\fPLu\f3:\fP S \f3:\fPLi\f3:\fP T{ .nf Lines inserted by Delta .fi T} " nnnnn S \f3:\fPLd\f3:\fP T{ Lines deleted by Delta T} " nnnnn S \f3:\fPLu\f3:\fP T{ .nf Lines unchanged by Delta .fi T} " nnnnn S \f3:\fPDT\f3:\fP Delta type " \f2D\^\fP~or~\f2R\^\fP S \f3:\fPI\f3:\fP T{ SCCS ID string (SID) T} " \f3:\fPR\f3:.:\fPL\f3:.:\fPB\f3:.:\fPS\f3:\fP S \f3:\fPR\f3:\fP Release number " nnnn S \f3:\fPL\f3:\fP Level number " nnnn S \f3:\fPB\f3:\fP Branch number " nnnn S \f3:\fPS\f3:\fP Sequence number " nnnn S \f3:\fPD\f3:\fP T{ Date Delta created T} " \f3:\fPDy\f3:\fP/\f3:\fPDm\f3:\fP/\f3:8 .TH A64L 3C .SH NAME a64l, l64a \- convert between long integer and base-64 \s-1ASCII\s0 string .SH SYNOPSIS .BR "long a64l (" s ) .br .BR "char \(**" s ; .PP .BR "char \(**l64a (" l ) .br .BR long " l" ; .SH DESCRIPTION These functions are used to maintain numbers stored in .I base-64\^ .SM ASCII characters. This is a notation by which long integers can be represented by up to 6 characters; each character represents a ``digit'' in a radix-64 notation. .PP The characters used to represent ``digits'' are .B . for 0, .B / for 1, .B 0 through .B 9 for 2\-11, .B A through .B Z for 12\-37, and .B a through .B z for 38\-63. .PP .I A64l\^ takes a pointer to a null-terminated base-64 representation and returns a corresponding .B long value. If the string pointed to by .I s\^ contains more than 6 characters, .I a64l\^ uses the first 6. .PP .I L64a\^ takes a .B long argument and returns a pointer to the corresponding base-64 representation. If the argument is 0, .I l64a\^ returns a pointer to a null string. .SH BUGS Th.\" @(#)dacos.3f 1.2 .so /usr/man/u_man/man3/acos.3f \fPDd\f3:\fP S \f3:\fPDy\f3:\fP T{ Year Delta created T} " nn S \f3:\fPDm\f3:\fP T{ Month Delta created T} " nn S \f3:\fPDd\f3:\fP T{ Day Delta created T} " nn S \f3:\fPT\f3:\fP T{ Time Delta created T} " \f3:\fPTh\f3:\fP\f3:\fP:Tm\f3:\fP\f3:\fP:Ts\f3:\fP S \f3:\fPTh\f3:\fP T{ Hour Delta created T} " nn S \f3:\fPTm\f3:\fP T{ Minutes Delta created T} " nn S \f3:\fPTs\f3:\fP T{ Seconds Delta created T} " nn S \f3:\fPP\f3:\fP T{ .nf Programmer who created Delta .fi T} " logname S \f3:\fPDS\f3:\fP T{ Delta seq. # T} " nnnn S \f3:\fPDP\f3:\fP T{ .nf Predecessor Delta seq. # .fi T} " nnnn S \f3:\fPDI\f3:\fP T{ Seq. # of deltas incl., excl., ignored T} " \f3:\fPDn\f3:\fP/\f3:\fPDx\f3:\fP/\f3:\fPDg\f3:\fP S \f3:\fPDn\f3:\fP T{ .nf Deltas included (seq. #) .fi T} " \f3:\fPDS\f3:\fP~\f3:\fPDS\f3:\fP\|\f3.\^.\^.\fP S \f3:\fPDx\f3:\fP T{ .nf Deltas excluded (seq. #) .fi T} " \f3:\fPDS\f3:\fP~\f3:\fPDS\f3:\fP\|\f3.\^.\^.\fP S \f3:\fPDg\f3:\fP T{ .nf Deltas ignored (seq. #) .fi T} " \f3:\fPDS\f3:\fP~\f3:\fPDS\f3:\fP\|\f3.\e value returned by .I l64a\^ is a pointer into a static buffer, the contents of which are overwritten by each call. .\" @(#)a64l.3c 1.4 9 .\" @(#)dasin.3f 1.2 .so /usr/man/u_man/man3/asin.3f ^.\^.\fP S \f3:\fPMR\f3:\fP MR numbers for delta " text M \f3:\fPC\f3:\fP Comments for delta " text M \f3:\fPUN\f3:\fP User names User Names text M \f3:\fPFL\f3:\fP Flag list Flags text M \f3:\fPY\f3:\fP Module type flag " text S \f3:\fPMF\f3:\fP T{ MR validation flag T} " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPMP\f3:\fP T{ .nf MR validation pgm name .fi T} " text S \f3:\fPKF\f3:\fP T{ .nf Keyword error/ warning flag .fi T} " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPBF\f3:\fP Branch flag " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPJ\f3:\fP Joint edit flag " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPLK\f3:\fP Locked releases " \f3:\fPR\f3:\fP\|\f3.\^.\^.\fP S \f3:\fPQ\f3:\fP User defined keyword " text S \f3:\fPM\f3:\fP Module name " text S \f3:\fPFB\f3:\fP Floor boundary " \f3:\fPR\f3:\fP S \f3:\fPCB\f3:\fP Ceiling boundary " \f3:\fPR\f3:\fP S \f3:\fPDs\f3:\fP Default SID " \f3:\fPI\f3:\fP S \f3:\fPND\f3:\fP Null delta flag " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPFD\f3:\fP T{ File descriptive text T} Comments text M \f3:\fPBD\f3:\fP Bo.TH ABORT 3C .SH NAME abort \- generate an \s-1IOT\s0 fault .SH SYNOPSIS .B int abort ( ) .SH DESCRIPTION .I Abort\^ causes an \s-1IOT\s0 signal to be sent to the process. This usually results in termination with a core dump. .PP It is possible for .I abort\^ to return control if .SM .B SIGIOT is caught or ignored, in which case the value returned is that of the .IR kill (2) system call. .SH "SEE ALSO" adb(1), exit(2), kill(2), signal(2). .SH DIAGNOSTICS If .SM .B SIGIOT is neither caught nor ignored, and the current directory is writable, a core dump is produced and the message .BR "abort \- core dumped" " is" written by the shell. .\" @(#)abort.3c 1.4 .\" @(#)datan.3f 1.2 .so /usr/man/u_man/man3/atan.3f 9 dy Body text M \f3:\fPGB\f3:\fP Gotten body " text M \f3:\fPW\f3:\fP T{ A form of \f2what\^\fP(1) string T} N/A \f3:\fPZ\f3:\fP\f3:\fPM\f3:\fP\e\|t\f3:\fPI\f3:\fP S \f3:\fPA\f3:\fP T{ A form of \f2what\^\fP(1) string T} N/A \f3:\fPZ\f3:\fP\f3:\fPY\f3:\fP~\f3:\fPM\f3:\fP~\f3:\fPI\f3:\fP\f3:\fPZ\f3:\fP S \f3:\fPZ\f3:\fP T{ \f2what\^\fP(1) string delimiter T} N/A @\&(#) S \f3:\fPF\f3:\fP SCCS filename N/A text S \f3:\fPPN\f3:\fP SCCS file pathname N/A text S .TE .sp .5v * \f3:\fPDt\f3:\fP~=~\f3:\fPDT\f3:\fP~\f3:\fPI\f3:\fP~\f3:\fPD\f3:\fP~\f3:\fPT\f3:\fP~\f3:\fPP\f3:\fP~\f3:\fPDS\f3:\fP~\f3:\fPDP\f3:\fP .DE .if t .ps +1 .if t .vs +1p .SH EXAMPLES The command .IP \f3prs \-d``Users and/or user \s-1ID\s+1s for :F: are:\e\|n:\s-1UN\s+1:'' s.file .PP may produce on the standard output: .PP .RS .nf \f3Users and/or user \s-1ID\s+1s for s.file are:\f1 \f3xyz\f1 \f3131\f1 \f3abc\f1 .fi .RE .PP The command .IP \f3prs \-d``Newest delta for pgm :M:: :I: Created :D: By :P:'' \-r s.file\f1 .PP may produce on the standard outp.TH ABORT 3F .SH NAME abort \- terminate FORTRAN program .SH SYNOPSIS .B "call abort ( )" .SH DESCRIPTION .I Abort\^ terminates the program which calls it, closing all open files, truncated to the current position of the file pointer. .SH DIAGNOSTICS When invoked, .I abort\^ prints .RB `` "Fortran abort routine called" '' on the standard error output. .SH SEE ALSO abort(3C). .\" @(#)abort.3f 1.5 .\" @(#)datan2.3f 1.2 .so /usr/man/u_man/man3/atan2.3f ut: .IP \f3Newest delta for pgm main.c: 3.7 Created 77/12/1 By cas\f1 .PP As a \f2special case:\^\fP .IP \f3prs s.file\f1 .PP may produce on the standard output: .PP .RS .nf \f3D 1.1 77/12/1 00:00:00 cas 1 000000/00000/00000\f1 \f3\s-1MR\s+1s:\f1 \f3bl78-12345\f1 \f3bl79-54321\f1 \f3\s-1COMMENTS\s+1:\f1 \f2this is the comment line for s.file initial delta\f1 .fi .RE .PP for each delta table entry of the ``D'' type. Only the .B \-a keyletter argument can be used with the .IR "special case" . .PP .SH FILES .RE .TP 10 /tmp/pr????? .i0 .SH "SEE ALSO" admin(1), delta(1), get(1), help(1), rmdel(1), sccsfile(4). .br ``Source Code Control System User's Guide'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS Use .IR help (1) for explanations. .tr ~~ .\" @(#)prs.1 1.12 : .TH ABS 3C .SH NAME abs \- return integer absolute value .SH SYNOPSIS .BR "int abs (" i ) .br .BR int " i" ; .SH DESCRIPTION .I Abs\^ returns the absolute value of its integer operand. .SH BUGS In two's-complement representation, the absolute value of the negative integer with largest magnitude is undefined. Some implementations trap this error, but others simply ignore it. .SH SEE ALSO floor(3M). .\" @(#)abs.3c 1.3 dble.3fdcmplx.3fdconjg.3fdcos.3fdcosh.3fdexp.3fdial.3cdimag.3fdint.3fdlog.3fdlog10.3f.TH PS 1 .SH NAME ps \- report process status .SH SYNOPSIS .B ps [ options ] .SH DESCRIPTION .I Ps\^ prints information about active processes. Without .IR options , information is printed about processes associated with the current terminal. Otherwise, the displayed information is controlled by the following .IR options : .PP .PD 0 .TP 15 .B \-e Print information about all processes. .TP .B \-d Print information about all processes, except process group leaders. .TP .B \-a Print information about all processes, except process group leaders and processes not associated with a terminal. .TP .B \-f Generate a .I full\^ listing. Normally, a short listing containing only process .SM ID\*S, terminal (``tty'') identifier, cumulative execution time, and the command name is printed. See below for meaning of columns in a full listing. .TP .B \-l Generate a .I long\^ listing. See below. .TP .BI \-c " corefile\^" Use the file .I corefile\^ in place of .BR /dev/mem . .TP .BI \-s " swapdev\^" Use the file .I swapdev\^ in.TH ABS 3F .SH NAME abs, iabs, dabs, cabs, zabs \- Fortran absolute value .SH SYNOPSIS .nf .BR "integer" " i1, i2" .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .BR "complex" " cx1, cx2" .BR "double complex" " dx1, dx2" .P .RB "r2" " = abs(" "r1" ")" .P .RB "i2" " = iabs(" "i1" ")" .RB "i2" " = abs(" "i1" ")" .P .RB "dp2" " = dabs(" "dp1" ")" .RB "dp2" " = abs(" "dp1" ")" .P .RB "cx2" " = cabs(" "cx1" ")" .RB "cx2" " = abs(" "cx1" ")" .P .RB "dx2" " = zabs(" "dx1" ")" .RB "dx2" " = abs(" "dx1" ")" .SH DESCRIPTION .I Abs\^ is the family of absolute value functions. .I Iabs\^ returns the integer absolute value of its integer argument. .I Dabs\^ returns the double-precision absolute value of its double-precision argument. .I Cabs\^ returns the complex absolute value of its complex argument. .I Zabs\^ returns the double-complex absolute value of its double-complex argument. The generic form .I abs\^ returns the type of its argument. .SH SEE ALSO floor(3M). .\" @(#)abs.3f 1.3 : 2VSPMJGDA>;852/,)&#   place of .BR /dev/swap . This is useful when examining a .IR corefile ; a .I swapdev\^ of .B /dev/null\^ causes the user block to be zeroed out. .TP .BI \-n " namelist\^" The argument is taken as the name of an alternate .I namelist\^ .RB ( /unix is the default). .TP .BI \-t " tlist\^" Restrict listing to data about the processes associated with the terminals given in .IR tlist , where .I tlist\^ can be in one of two forms: a list of terminal identifiers separated by commas, or a list of terminal identifiers enclosed in double quotes and separated by a comma and/or one or more spaces. .TP .BI \-p " plist\^" Restrict listing to data about processes whose process .SM ID numbers are given in .IR plist , where .I plist\^ is in the same format as .IR tlist . .TP .BI \-u " ulist\^" Restrict listing to data about processes whose user .SM ID numbers or login names are given in .IR ulist , where .I ulist\^ is in the same format as .IR tlist . In the listing, the numerical user .SM ID is printed unless the .B \-f opt.TH ACOS 3F .SH NAME acos, dacos \- Fortran arccosine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = acos(" "r1" ")" .P .RB "dp2" " = dacos(" "dp1" ")" .RB "dp2" " = acos(" "dp1" ")" .SH DESCRIPTION .I Acos\^ returns the real arccosine of its real argument. .I Dacos\^ returns the double-precision arccosine of its double-precision argument. The generic form .I acos\^ may be used with impunity because its argument determines the type of the returned value. .SH SEE ALSO trig(3M). .\" @(#)acos.3f 1.4 .\" @(#)dcmplx.3f 1.2 .so /usr/man/u_man/man3/ftype.3f ; ion is used, in which case the login name is printed. .TP .BI \-g " glist\^" Restrict listing to data about processes whose process groups are given in .IR glist , where .I glist\^ is a list of process group leaders and is in the same format as .IR tlist . .PD .PP The column headings and the meaning of the columns in a .I ps\^ listing are given below; the letters .B f and .B l indicate the option .RI ( full\^ or .IR long ) that causes the corresponding heading to appear; .B all means that the heading always appears. Note that these two options only determine what information is provided for a process; they do .I not\^ determine which processes are to be listed. .ta .65i .ne 7 .PP .PD 0 .TP 16 .SM .BR F\*S " (l)" Flags (octal and additive) associated with the process: .RS 20 .TP 6 01 in core .TP 6 02 system process .TP 6 04 locked in core (e.g., for physical .SM I/O\*S) .TP 6 10 being swapped .TP 6 20 being traced by another process .TP 6 40 another tracing flag .RE .TP .SM .BR S\*S " (l)" The state of the pro.\" @(#)acos.3m 1.2 .so /usr/man/u_man/man3/trig.3m .\" @(#)dconjg.3f 1.2 .so /usr/man/u_man/man3/conjg.3f cess: .RS 20 .TP 6 0 non-existent .TP 6 S sleeping .TP 6 W waiting .TP 6 R running .TP 6 I intermediate .TP 6 Z terminated .TP 6 T stopped .TP 6 X growing .RE .br .ne 2 .TP .SM .BR UID\*S " (f,l)" The user .SM ID number of the process owner; the login name is printed under the .B \-f option. .TP .SM .BR PID\*S " (all)" The process .SM ID of the process; it is possible to kill a process if you know the \fBPID\fR. .TP .SM .BR PPID\*S " (f,l)" The process .SM ID of the parent process. .TP .SM .BR C\*S " (f,l)" Processor utilization for scheduling. .TP .SM .BR STIME\*S " (f)" Starting time of the process. .TP .SM .BR PRI\*S " (l)" The priority of the process; higher numbers mean lower priority. .TP .SM .BR NI\*S " (l)" Nice value; used in priority computation. .TP .SM .BR ADDR\*S " (l)" The memory address of the process (a pointer to the segment table array on the 3B20S), if resident; otherwise, the disk address. .TP .SM .BR SZ\*S " (l)" The size in blocks of the core image of the process. .TP .SM .BR WCHAN\*S " ; .TH AIMAG 3F .SH NAME aimag, dimag \- FORTRAN imaginary part of complex argument .SH SYNOPSIS .nf .BR "real" " r" .BR "complex" " cxr" .BR "double precision" " dp" .BR "double complex" " cxd" .P .RB "r" " = aimag(" "cxr" ")" .P .RB "dp" " = dimag(" "cxd" ")" .SH DESCRIPTION .I Aimag\^ returns the imaginary part of its single-precision complex argument. .I Dimag\^ returns the double-precision imaginary part of its double-complex argument. .\" @(#)aimag.3f 1.4 .\" @(#)dcos.3f 1.2 .so /usr/man/u_man/man3/cos.3f (l)" The event for which the process is waiting or sleeping; if blank, the process is running. .TP .SM .BR TTY\*S " (all)" The controlling terminal for the process. .TP .SM .BR TIME\*S " (all)" The cumulative execution time for the process. .TP .SM .BR CMD\*S " (all)" The command name; the full command name and its arguments are printed under the .B \-f option. .DT .PD .PP A process that has exited and has a parent, but has not yet been waited for by the parent, is marked .BR . .PP Under the .B \-f option, .I ps\^ tries to determine the command name and arguments given when the process was created by examining memory or the swap area. Failing this, the command name, as it would appear without the .B \-f option, is printed in square brackets. .SH FILES .PD 0 .TP "\w'/etc/ps_data\ \ \ 'u" /unix system namelist. .TP /dev/mem memory. .TP /dev/swap the default swap device. .TP /etc/passwd supplies \s-1UID\s+1 information. .TP /etc/ps_data internal data structure. .TP /dev searched to find terminal (``tt.TH AINT 3F .SH NAME aint, dint \- FORTRAN integer part intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = aint(" "r1" ")" .P .RB "dp2" " = dint(" "dp1" ")" .RB "dp2" " = aint(" "dp1" ")" .SH DESCRIPTION .I Aint\^ returns the truncated value of its real argument in a real. .I Dint\^ returns the truncated value of its double-precision argument as a double-precision value. .I Aint\^ may be used as a generic function name, returning either a real or double-precision value depending on the type of its argument. .\" @(#)aint.3f 1.4 < .\" @(#)dcosh.3f 1.2 .so /usr/man/u_man/man3/cosh.3f y'') names. .DT .PD .SH SEE ALSO kill(1), nice(1). .SH BUGS Things can change while .I ps\^ is running; the picture it gives is only a close approximation to reality. Some data printed for defunct processes are irrelevant. .\" @(#)ps.1 1.4 .\" @(#)alog.3f 1.2 .so /usr/man/u_man/man3/log.3f .\" @(#)dexp.3f 1.2 .so /usr/man/u_man/man3/exp.3f < .TH PTX 1 .SH NAME ptx \- permuted index .SH SYNOPSIS .B ptx [ options ] [ input [ output ] ] .SH DESCRIPTION .I Ptx\^ generates the file .I output\^ that can be processed with a text formatter to produce a permuted index of file .I input\^ (standard input and output default). It has three phases: the first does the permutation, generating one line for each keyword in an input line. The keyword is rotated to the front. The permuted file is then sorted. Finally, the sorted lines are rotated so the keyword comes at the middle of each line. .I Ptx\^ output is in the form: .br .IP \&\f3.xx\fP ``tail'' ``before keyword'' ``keyword and after'' ``head'' .PP where .B \&.xx is assumed to be an .I nroff\^ or .IR troff (1) macro provided by the user, or provided by the .IR mptx (5) macro package. The .I "before keyword\^" and .I "keyword and after\^" fields incorporate as much of the line as will fit around the keyword when it is printed. .I Tail\^ and .IR head , at least one of which is always the empty string, are wra.\" @(#)alog10.3f 1.2 .so /usr/man/u_man/man3/log10.3f .TH DIAL 3C .SH NAME dial \- establish an out-going terminal line connection .SH SYNOPSIS .B #include .PP .BR "int dial (" call ) .br .BR "\s-1CALL\s+1 \(**" call ; .PP .BR "void undial (" fd ) .br .BR int " fd" ; .SH DESCRIPTION .I Dial\^ returns a file descriptor for a terminal line open for read/write. The argument to .I dial\^ is a \s-1CALL\s+1 structure (defined in the .B header file. .P When finished with the terminal line, the calling program must invoke .I undial\^ to release the semaphore that has been set during the allocation of the terminal device. .PP The .SM CALL typedef in the .B \^ header file is: .PP .nf .ta .5i 1.8i 2.2i 2.8i \f3typedef struct {\f1 \f3struct termio \(**attr;\f1 /\(** pointer to termio attribute struct \(**/ \f3int baud;\f1 /\(** transmission data rate \(**/ \f3int speed;\f1 /\(** 212A modem: low=300, high=1200 \(**/ \f3char \(**line;\f1 /\(** device name for out-going line \(**/ \f3char \(**telno;\f1 /\(** pointer to tel-no digits string \pped-around pieces small enough to fit in the unused space at the opposite end of the line. .PP The following \fIoptions\fP can be applied: .TP 11 .BR \-f Fold upper and lower case letters for sorting. .TP .BR \-t Prepare the output for the phototypesetter. .TP .BI \-w " n\^" Use the next argument, .IR n , as the length of the output line. The default line length is 72 characters for .I nroff\^ and 100 for .IR troff . .TP .BI \-g " n\^" Use the next argument, .IR n , as the number of characters that .I ptx\^ reserves in its calculations for each gap among the four parts of the line as finally printed. The default gap is 3. .TP .BI \-o " only\^" Use as keywords only the words given in the \fIonly\fR file. .TP .BI \-i " ignore\^" Do not use as keywords any words given in the .I ignore file. If the .B \-i and .B \-o options are missing, use .B /usr/lib/eign as the .I ignore file. .TP .BI \-b " break\^" Use the characters in the .I break file to separate words. Tab, new-line, and space characters are always used = .\" @(#)amax0.3f 1.2 .so /usr/man/u_man/man3/max.3f (**/ \f3int modem;\f1 /\(** specify modem control for direct lines \(**/ \f3} \s-1CALL\s+1;\f1 .fi .PP The \s-1CALL\s+1 element .I speed\^ is intended only for use with an outgoing dialed call, in which case its value should be either 300 or 1200 to identify the 113A modem, or the high-speed or low-speed setting on the 212A modem. The \s-1CALL\s+1 element .I baud is for the desired transmission baud rate. For example, one might set .I baud\^ to 110 and .I speed\^ to 300 (or 1200). .P If the desired terminal line is a direct line, a string pointer to its device name should be placed in the .I line\^ element in the \s-1CALL\s+1 structure. Legal values for such terminal device names are kept in the .I L-devices\^ file. In this case, the value of the .I baud\^ element need not be specified as it will be determined from the .I L-devices\^ file. .P The .I telno\^ element is for a pointer to a character string representing the telephone number to be dialed. Such numbers may consist only of symbols described on the as break characters. .TP .BR \-r Take any leading non-blank characters of each input line to be a reference identifier (e.g., a page or chapter reference), separate from the text of the line. Attach the reference identifier as a 5th field on each output line. .PP The index for this manual was generated using .IR ptx . .SH FILES /bin/sort .br /usr/lib/eign .br /usr/lib/tmac/tmac.ptx .PD .SH SEE ALSO .PD 0 nroff(1), troff(1), mm(5), mptx(5). .PD .SH BUGS Line length counts do not account for overstriking or proportional spacing. .br Lines that contain tildes (\f3~\fP) are botched, because . I ptx uses that character internally. .\" @(#)ptx.1 1.4 .\" @(#)amax1.3f 1.2 .so /usr/man/u_man/man3/max.3f = .IR acu (7). The termination symbol will be supplied by the .I dial\^ function, and should not be included in the .I telno\^ string passed to .I dial\^ in the \s-1CALL\s+1 structure. .P The \s-1CALL\s+1 element .I modem\^ is used to specify modem control for direct lines. This element should be non-zero if modem control is required. The \s-1CALL\s+1 element .I attr\^ is a pointer to a .I termio\^ structure, as defined in the .B \^ header file. A \s-1NULL\s+1 value for this pointer element may be passed to the .I dial\^ function, but if such a structure is included, the elements specified in it will be set for the outgoing terminal line before the connection is established. This is important for attributes such as parity and baud rate. .SH FILES /usr/lib/uucp/L-devices .br /usr/spool/uucp/\s-1LCK\s+1..\fItty-device\fP .SH "SEE ALSO" uucp(1C), alarm(2), read(2), write(2). .br termio(7) in the .IR "\*(6) Administrator's Manual" . .SH DIAGNOSTICS On failure, a negative value indicating the reason for th.TH PWD 1 .SH NAME pwd \- working directory name .SH SYNOPSIS .B pwd .SH DESCRIPTION .I Pwd\^ prints the pathname of the working (current) directory. .SH "SEE ALSO" cd(1). .SH DIAGNOSTICS .B "Cannot open .." and .B "Read error in .." indicate possible file system trouble. These messages should be referred to a system programming counselor. .\" @(#)pwd.1 1.3 .\" @(#)amin0.3f 1.2 .so /usr/man/u_man/man3/min.3f e failure is returned. Mnemonics for these negative indices as listed here are defined in the .B header file. .PP .nf .ta .5i 1.3i 2.0i \f3\s-1INTRPT\s+1 \-1\f1 /\(** interrupt occured \(**/ \f3\s-1D_HUNG\s+1 \-2\f1 /\(** dialer hung (no return from write) \(**/ \f3\s-1NO_ANS\s+1 \-3\f1 /\(** no answer within 10 seconds \(**/ \f3\s-1ILL_BD\s+1 \-4\f1 /\(** illegal baud-rate \(**/ \f3\s-1A_PROB\s+1 \-5\f1 /\(** acu problem (open() failure) \(**/ \f3\s-1L_PROB\s+1 \-6\f1 /\(** line problem (open() failure) \(**/ \f3\s-1NO_L\s+1dv \-7\f1 /\(** can't open \s-1LDEVS\s+1 file \(**/ \f3\s-1DV_NT_A\s+1 \-8\f1 /\(** requested device not available \(**/ \f3\s-1DV_NT_K\s+1 \-9\f1 /\(** requested device not known \(**/ \f3\s-1NO_BD_A\s+1 \-10\f1 /\(** no device available at requested baud \(**/ \f3\s-1NO_BD_K\s+1 \-11\f1 /\(** no device known at requested baud \(**/ .fi .SH WARNINGS Including the .B \^ header file automatically includes the .B \^ header file. .PP Because the above ro> .TH RATFOR 1 .SH NAME ratfor \- rational FORTRAN dialect .SH SYNOPSIS .B ratfor [ options ] [ files ] .SH DESCRIPTION .I Ratfor\^ converts a rational dialect of \s-1FORTRAN\s+1 into ordinary irrational \s-1FORTRAN\s+1. .I Ratfor\^ provides control flow constructs essentially identical to those in C: .RS .TP \(bu\|\|\|statement grouping: \f3{\f2 statement\f3;\f2 statement\f3;\f2 statement\f3 }\f1 .TP \(bu\|\|\|decision-making: .nf \f3if\fP (\f2condition\f1)\f2 statement\f1 [ \f3else\f2 statement\f1 ] \f3switch\fP (\f2integer value\f1)\f3 { \f3case\f2 integer\f3:\f2 statement\f1 ... [ \f3default\fP: ] \f2statement\f1 \f3}\f1 .fi .TP \(bu\|\|\|loops: .br .nf \f3while\fP (\f2condition\f1) \f2statement\f1 \f3for\fP (\f2expression\f3;\f2 condition\f3;\f2 expression\f1)\f2 statement\f1 \f3do\f2 limits statement\f1 \f3repeat\f2 statement\f1 [ \f3until\fP (\f2condition\f1) ] \f3break\fP \f3next\fP .fi .RE .PP and some syntactic sugar to make programs easier to read and write: .RS .TP \(bu\|\|\|free form input: mult.\" @(#)amin1.3f 1.2 .so /usr/man/u_man/man3/min.3f utine uses \fB\fP, the size of programs not otherwise using standard I/O is increased more than might be expected. .SH BUGS An .IR alarm (2) system call for 3,600 seconds is made (and caught) within the .I dial\^ module for the purpose of ``touching'' the \fI\s-1LCK\s+1..\fP file and constitutes the device allocation semaphore for the terminal device. Otherwise, .IR uucp (1C) may simply delete the \fI\s-1LCK\s+1..\fP entry on its 90-minute clean-up rounds. The alarm may go off while the user program is in a .IR read (2) or .IR write (2) system call, causing an apparent error return. If the user program is to run for an hour or more, error returns from .IR read s should be checked for \fB(errno==\s-1EINTR\s+1)\fP, and the .I read\^ possibly reissued. .\" @(#)dial.3c 1.8 iple statements/line; automatic continuation .TP \(bu\|\|\|comments: .B # \f2This is a comment.\f1 .TP \(bu\|\|\|translation of relationals: for example, .BR > , .BR >= , become .BR .\s-1GT\s+1. , .BR .\s-1GE\s+1. . .TP \(bu\|\|\|return expression to caller from function: \f3return\fP (\f2expression\f1) .TP \(bu\|\|\|define: .br .B define .I name replacement\^ .TP \(bu\|\|\|include: .br .B include .I file\^ .RE .PP The option .B \-h causes quoted strings to be turned into .B 27H constructs. The .B \-C option copies comments to the output and attempts to format it neatly. Normally, continuation lines are marked with a .B & in column 1; the option .B \-6x makes the continuation character .B x and places it in column 6. .PP .I Ratfor\^ is best used with .IR f77 (1). .SH SEE ALSO ef\&l(1), f77(1). .br B. W. Kernighan and P. J. Plauger, ``Software Tools'', Addison-Wesley, 1976. .br ``\s-1FORTRAN\s+1'' in the .IR "\*(6) Programming Guide" . .\" @(#)ratfor.1 1.6 > .\" @(#)amod.3f 1.2 .so /usr/man/u_man/man3/mod.3f .\" @(#)dimag.3f 1.2 .so /usr/man/u_man/man3/aimag.3f .\" @(#)red.1 1.2 .so /usr/man/u_man/man1/ed.1 .\" @(#)and.3f 1.2 .so /usr/man/u_man/man3/bool.3f ? .\" @(#)dint.3f 1.2 .so /usr/man/u_man/man3/aint.3f .TH REGCMP 1 .SH NAME regcmp \- regular expression compile .SH SYNOPSIS .B regcmp [ .B \- ] files .SH DESCRIPTION .IR Regcmp , in most cases, precludes the need for calling .IR regcmp (3X) from C programs. This saves both execution time and program size. The command .I regcmp\^ compiles the regular expressions in .I file\^ and places the output in .IB file .i\fR.\fP If the \fB\-\fP option is used, the output is placed in .IB file .c\fR.\fP The format of entries in .I file\^ is a name (C variable), followed by one or more blanks, followed by a regular expression enclosed in double quotes. The output of .I regcmp\^ is C source code. Compiled regular expressions are represented as .B "extern char" vectors. .IB File .i files may thus be .I included\^ into C programs, or .IB file .c files may be compiled and later loaded. In the C program which uses the .I regcmp\^ output, .IR regex ( abc , line ) applies the regular expression named .I abc\^ to .IR line . Diagnostics are self-explanatory. .SH EXAMPLES .TP "\w'tel.\" @(#)anint.3f 1.2 .so /usr/man/u_man/man3/round.3f .\" @(#)dlog.3f 1.2 .so /usr/man/u_man/man3/log.3f ? no\ \ \ \ 'u" name ``([A\-Za\-z][A\-Za\-z0\-9\_]\(**)$0'' .TP telno ``\\({0,1}([2\-9][01][1\-9])$0\\){0,1} \(**'' .br ``([2\-9][0\-9]{2})$1[ \-]{0,1}'' .br ``([0\-9]{4})$2'' .TP In the C program that uses the \fIregcmp\fP output, .PP .RS \f3regex(telno, line, area, exch, rest)\f1 .RE .PP applies the regular expression named \f3telno\f1 to \f3line\f1. .SH SEE ALSO regcmp(3X). .\" @(#)regcmp.1 1.4 .\" @(#)asctime.3c 1.2 .so /usr/man/u_man/man3/ctime.3c .\" @(#)dlog10.3f 1.2 .so /usr/man/u_man/man3/log10.3f .TH RM 1 .SH NAME rm, rmdir \- remove files or directories .SH SYNOPSIS .B rm [ .B \-fri ] file ... .PP .B rmdir dir ... .PP .SH DESCRIPTION .I Rm\^ removes the entries for one or more files from a directory. If an entry is the last link to the file, the file is destroyed. Removal of a file requires write permission in its directory, but neither read nor write permission on the file itself. .PP If a file has no write permission and the standard input is a terminal, its permissions are printed and a line is read from the standard input. If that line begins with \f3y\fP the file is deleted; otherwise, the file remains. No questions are asked when the .B \-f option is given or if the standard input is not a terminal. .PP If a designated file is a directory, an error comment is printed unless the optional argument .B \-r has been used. When \f3\-r\f1 is used, .I rm\^ recursively deletes the entire contents of the specified directory, and the directory itself. To remove a directory, you must be located at the ne@ .TH ASIN 3F .SH NAME asin, dasin \- FORTRAN arcsine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = asin(" "r1" ")" .P .RB "dp2" " = dasin(" "dp1" ")" .RB "dp2" " = asin(" "dp1" ")" .SH DESCRIPTION .I Asin\^ returns the real arcsine of its real argument. .I Dasin\^ returns the double-precision arcsine of its double-precision argument. The generic form .I asin\^ may be used with impunity as it derives its type from that of its argument. .SH SEE ALSO trig(3M). .\" @(#)asin.3f 1.4 B \-q Report average queue length while occupied, and % of time occupied: .br runq-sz, %runocc \- run queue of processes in memory and runnable; .br swpq-sz, %swpocc \- swap queue of processes swapped out but ready to run. .sp .TP .B \-v Report status of text, process, inode and file tables: .br text-sz, proc-sz, inod-sz, file-sz \- entries/size for each table, evaluated once at sampling point; .br text-ov, proc-ov, inod-ov, file-ov \- overflows occurring between sampling points. .sp .TP .B \-m Report message and semaphore activities: .br msg/s, sema/s \- primitives per second. .sp .TP .B \-A Report all data. Equivalent to .BR \-udqbwcayvm . .SH EXAMPLES To see today's .SM CPU activity so far: .PP .RS .B sar .RE .PP To watch .SM CPU activity evolve for 10 minutes and save data: .PP .RS .B "sar \|\-o temp 60 10" .RE .PP To later review disk and tape activity from that period: .PP .RS .B "sar \|\-d \|\-f temp" .RE .SH FILES .TP 18 .RI /usr/adm/sa/sa dd\^ daily data file, where .I dd\^ are digits representing txt higher level (parent directory) in the directory hierarchy. You cannot be located in the directory you are trying to remove. For example, if the full pathname of a directory is \f3/top/next\f1, you must be in \f3/top\f1 to remove the directory \f3next\f1. .PP If the .B \-i (interactive) option is in effect, .I rm\^ asks whether to delete each file. The name of the file is printed on the terminal followed by a colon. If you do not want to delete the file, press the carriage return. If you do want to delete the file, type input that begins with the letter ``\f3y\f1''. The \f3\-i\f1 option can be used in combination with the \f3\-r\f1 option to interactively delete directories. When the command \f3rm \-ir\f2 directory name\f1 is given, the message \f3directory\f2 directory name\f3:\f1 is printed on the terminal. As with interactive file deletion, type either input beginning with the letter \f3y\f1 or a carriage return alone to delete or not delete a directory. .PP .I Rmdir\^ removes entries for the name.\" @(#)asin.3m 1.2 .so /usr/man/u_man/man3/trig.3m @ he day of the month. .SH SEE ALSO sag(1G). .br sar(1M) in the .IR "\*(6) Administrator's Manual" . .\" @(#)sar.1 1.6 d directories, which must be empty. .SH SEE ALSO unlink(2). .SH DIAGNOSTICS Generally self-explanatory. It is forbidden to remove the file \f3..\fP merely to avoid the consequences of inadvertently doing something like: .PP .RS .B "rm \-r .\(**" .RE .\" @(#)rm.1 1.4 2UROLIFC@=:741.+(%"  .TH SCAT 1 .SH NAME scat \- concatenate and print files on synchronous printer .SH SYNOPSIS .B scat [ .B \-u ] [ .B \-s ] file .\|.\|. .SH DESCRIPTION .I Scat\^ reads each .I file\^ in sequence and writes it on the standard output, which is assumed to be a synchronous printer device. Thus: .PP .RS .B "scat file > /dev/sp0" .RE .PP prints the file, and: .PP .RS .B "scat file1 file2 > /dev/sp0" .RE .PP concatenates .I file1\^ and .I file2\^ and places the result on the printer. .PP If no input file is given, or if the argument .B \- is encountered, .I scat\^ reads from the standard input file. Output is buffered in 512-byte blocks unless the .B \-u option is specified. The .B \-s option makes .I scat\^ silent about non-existent files. .SH SEE ALSO cp(1), pr(1), stty(1). .SH WARNINGS .I Scat\^ uses synchronous printers in line mode with the wrap around option enabled. This means that the maximum line length is 79 characters; longer lines are wrapped back to the beginning of the next line each time the end of a pA .\" @(#)rmail.1 1.2 .so /usr/man/u_man/man1/mail.1 .TH ATAN 3F .SH NAME atan, datan \- FORTRAN arctangent intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = atan(" "r1" ")" .P .RB "dp2" " = datan(" "dp1" ")" .RB "dp2" " = atan(" "dp1" ")" .SH DESCRIPTION .I Atan\^ returns the real arctangent of its real argument. .I Datan\^ returns the double-precision arctangent of its double-precision argument. The generic form .I atan\^ may be used with a double-precision argument returning a double-precision value. .SH SEE ALSO trig(3M). .\" @(#)atan.3f 1.4 rinter line is reached. .\" @(#)scat.1 1.3 .TH RMDEL 1 .SH NAME rmdel \- remove a delta from an \s-1SCCS\s+1 file .SH SYNOPSIS .B rmdel .if n .ul \fB\-r\fR\c .if n .ul 0 \s-1SID\s0 files .SH DESCRIPTION .I Rmdel\^ removes the delta specified by the .SM \fISID\fP from each named \s-1SCCS\s+1 file. The delta to be removed must be the newest (most recent) delta in its branch in the delta chain of each named \s-1SCCS\s+1 file. In addition, the specified .SM \fISID\fR must not be that of a version being edited for the purpose of making a delta (i. e., if a .I p-file\^ (see .IR get (1)) exists for the named \s-1SCCS\s+1 file, the specified .SM \fISID\fR must .I not\^ appear in any entry of the .I p-file\c\^ ). .PP If a directory is named, .I rmdel\^ behaves as though each file in the directory were specified as a named file, except that non-\s-1SCCS\s+1 files (last component of the pathname does not begin with \fBs.\fR) and unreadable files are silently ignored. If a name of \fB\-\fR is given, the standard input is read; each line of the standard input is tA .\" @(#)atan.3m 1.2 .so /usr/man/u_man/man3/trig.3m .TH SCC 1 .SH NAME scc \- C compiler for stand-alone programs .SH SYNOPSIS .B scc [ .B +\c [ lib ] ] [ option ] ... [ file ] ... .SH DESCRIPTION .I Scc\^ prepares the named files for stand-alone execution. The .I option\^ and .I file\^ arguments may be anything that can legally be used with the .I cc\^ command; it should be noted, though, that the .B \-p (profiling) option, as well as any object module that contains system calls, causes the executable not to run. .PP .I Scc\^ defines the compiler constant, .BR \s-1STANDALONE\s+1 , so that sections of C programs may be compiled conditionally when the executable is run stand-alone. .PP The first argument specifies an auxiliary library that defines the device configuration of the computer for which the stand-alone executable is being prepared. .I Lib\^ may be one of the following: .TP 8 .B A .SM RP\*S04/05/06 disk and .SM TU\*S16 magnetic tape, or equivalent on the \s-1PDP\s+1-11 plus \s-1RM\s+105 and \s-1RM\s+180 disks, and \s-1TU\s+178 and \s-1TS\s+111 tapes, aken to be the name of an \s-1SCCS\s+1 file to be processed; non-\s-1SCCS\s+1 files and unreadable files are silently ignored. .PP The exact permissions necessary to remove a delta are documented in the ``Source Code Control System User's Guide''. Simply stated, if you make a delta you can remove it; if you own the file and directory you can remove a delta. .SH FILES .PD 0 .TP 10 x-file (see .IR delta (1)) .TP 10 z-file (see .IR delta (1)) .PD .SH "SEE ALSO" delta(1), get(1), help(1), prs(1), sccsfile(4). .br ``Source Code Control System User's Guide'' in the .IR "\*(6) User's Guide" . .br .SH DIAGNOSTICS Use .IR help (1) for explanations. .\" @(#)rmdel.1 1.5 .TH ATAN2 3F .SH NAME atan2, datan2 \- FORTRAN arctangent intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2, r3" .BR "double precision" " dp1, dp2, dp3" .P .RB "r3" " = atan2(" "r1, r2" ) .P .RB "dp3" " = datan2(" "dp1, dp2" ")" .RB "dp3" " = atan2(" "dp1, dp2" ")" .SH DESCRIPTION .I Atan2\^ returns the arctangent of .I arg1/arg2 as a real value. .I Datan2\^ returns the double-precision arctangent of its double-precision arguments. The generic form .I atan2\^ may be used with impunity with double-precision arguments. .SH SEE ALSO trig(3M). .\" @(#)atan2.3f 1.4 B or equivalent .TP .B B \s-1RK\s+111/\s-1RK\s+105 disk, \s-1RP\s+111/\s-1RP\s+103 disk, and \s-1TM\s+111/\s-1TU\s+116 magnetic tape, or equivalent .PP If no .BI + lib\^ argument is specified, .B +A is assumed. If the .B + argument is specified alone, no configuration library is loaded unless the user supplies his own. .SH FILES .nr t1 \w'/usr/lib/lib2A.a ' .nr t2 \n(t1+\w'+A configuration library ' .ta \n(t1u \n(t2u /lib/crt2.o execution start-off .br /usr/lib/lib2.a stand-alone library .br /usr/lib/lib2A.a +A configuration library (\s-1PDP\s+1-11 only) .br /usr/lib/lib2B.a +B configuration library (\s-1PDP\s+1-11 only) .SH SEE ALSO cc(1), ld(1), a.out(4). .\" @(#)scc.1 1.4 .\" @(#)rmdir.1 1.2 .so /usr/man/u_man/man1/rm.1 .\" @(#)atan2.3m 1.2 .so /usr/man/u_man/man3/trig.3m .TH SCCSDIFF 1 .SH NAME sccsdiff \- compare two versions of an \s-1SCCS\s+1 file .SH SYNOPSIS .B sccsdiff .BR \-r \s-1SID\s+1\&1 .BR \-r \s-1SID\s+1\&2 .RB [ \-p ] .RB [ \-s n] files .SH DESCRIPTION .I Sccsdiff\^ compares two versions of an .SM SCCS file and generates the differences between the two versions. Any number of .SM SCCS files may be specified, but arguments apply to all files. .RS 5 .TP 12 .BI \-r \s-1SID\s+1?\^ .IR \s-1SID\s+11 \ and \ \s-1SID\s+12 \ specify the deltas of an .SM SCCS file that are to be compared. Versions are passed to .IR bdiff (1) in the order given. .TP 12 .B \-p pipe output for each file through .IR pr (1). .TP 12 .BI \-s n\^ \fIn\fP is the file segment size that .I bdiff\^ will pass to .IR diff (1). This is useful when .I diff\^ fails due to a high system load. .SH FILES .TP "\w'/tmp/get?????\ \ 'u" /tmp/get????? Temporary files .SH "SEE ALSO" bdiff(1), get(1), help(1), pr(1). .br ``Source Code Control System'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS .I file: .B "NB .\" @(#)rsh.1 1.2 .so /usr/man/u_man/man1/sh.1 .TH ATOF 3C .SH NAME atof \- convert \s-1ASCII\s0 string to floating-point number .SH SYNOPSIS .BR "double atof (" nptr ) .br .BR "char \(**" nptr ; .SH DESCRIPTION .I Atof\^ converts a character string pointed to by .I nptr\^ to a double-precision floating-point number. The first unrecognized character ends the conversion. .I Atof\^ recognizes an optional string of white-space characters (blanks or tabs), then an optional sign, then a string of digits optionally containing a decimal point, then an optional .B e or .B E followed by an optionally signed integer. If the string begins with an unrecognized character, .I atof\^ returns the value zero. .SH DIAGNOSTICS When the correct value would overflow, .I atof\^ returns .SM .BR HUGE, and sets .I errno\^ to .SM .BR ERANGE\*S . Zero is returned on underflow. .SH SEE ALSO scanf(3S). .\" @(#)atof.3c 1.4 o differences" means the two versions are the same. .sp Use .IR help (1) for explanations. .PD .\" @(#)sccsdiff.1 1.6 .TH SACT 1 .SH NAME sact \- print current \s-1SCCS\s+1 file editing activity .SH SYNOPSIS .B sact files .SH DESCRIPTION .I Sact\^ informs the user of any impending deltas to a named .SM SCCS file. This situation occurs when .IR get (1) with the .B \-e option has been previously executed without a subsequent execution of .IR delta (1). If a directory is named on the command line, .I sact\^ behaves as though each file in the directory were specified as a named file, except that non-\s-1SCCS\s+1 files and unreadable files are silently ignored. If a name of .B \- is given, the standard input is read with each line being taken as the name of an .SM SCCS file to be processed. .P The output for each named file consists of five fields separated by spaces. .RS 5 .TP 12 Field 1 specifies the .SM SID of a delta that currently exists in the .SM SCCS file to which changes will be made to make the new delta. .TP 12 Field 2 specifies the .SM SID for the new delta to be created. .TP 12 Field 3 contains the login id of the usC .\" @(#)atoi.3c 1.2 .so /usr/man/u_man/man3/strtol.3c .TH SDB 1 .SH NAME sdb \- symbolic debugger .SH SYNOPSIS .B sdb [\fB\-w\fR] [\fB\-W\fR] [ objfil [ corfil [ directory ] ] ] .SH DESCRIPTION .I Sdb\^ is a symbolic debugger which can be used with C and F77 programs. It may be used to examine their object files and core files and to provide a controlled environment for their execution. .PP .I Objfil\^ is normally an executable program file which has been compiled with the .B \-g (debug) option; if it has not been compiled with the .B \-g option, or if it is not an executable file, the symbolic capabilities of .I sdb\^ are limited, but the file can still be examined and the program debugged. The default for .I objfil\^ is .BR a.out . .I Corfil\^ is assumed to be a core image file produced after executing .IR objfil ; the default for .I corfil\^ is .BR core . The core file need not be present. A .B \- in place of .I corfil\^ forces .I sdb\^ to ignore any core image file. Source files used in constructing .I objfil\^ must be in .I directory to be located. .PP It ier who will make the delta (i.e., executed a .I get\^ for editing). .TP 12 Field 4 contains the date that .B "get \-e" was executed. .TP 12 Field 5 contains the time that .B "get \-e" was executed. .SH "SEE ALSO" delta(1), get(1), unget(1). .br ``Source Code Control System User's Guide'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS Use .IR help (1) for explanations. .\" @(#)sact.1 1.6 .\" @(#)atol.3c 1.2 .so /usr/man/u_man/man3/strtol.3c C s useful to know that at any time there is a .I "current line\^" and .IR "current file" . If .I corfil\^ exists then they are initially set to the line and file containing the source statement at which the process terminated. Otherwise, they are set to the first line in .BR main (). The current line and file may be changed with the source file examination commands. .PP By default, warnings are provided if the source files used in producing .I objfil cannot be found or are newer than .IR objfil . This checking feature and the accompanying warnings may be disabled by the use of the .B \-W flag. .PP Names of variables are written just as they are in C or F77. Variables local to a procedure may be accessed using the form .IB procedure : variable\fR. If no procedure name is given, the procedure containing the current line is used by default. .P It is also possible to refer to structure members as .IB variable . member\fR, pointers to structure members as .IB variable \(mi> member , and array elements as .IB variab.TH SADP 1 .SH NAME sadp \- disk access profiler .SH SYNOPSIS .B sadp [ .B \-th ] [ .B \-d device[\|\-drive] ] s [ n ] .SH DESCRIPTION .I Sadp reports disk access location and seek distance, in tabular or histogram form. It samples disk activity once every second during an interval of .I s seconds. This is done repeatedly if .I n is specified. Cylinder usage and disk distance are recorded in units of eight cylinders. .PP The only valid value of .I device is .BR disk. .I Drive specifies the disk drives and it may be: a drive number in the range supported by .IR device , two numbers separated by a minus (indicating an inclusive range), or a list of drive numbers separated by commas. .PP Up to eight disk drives may be reported. The .B \-d option may be omitted, if only one .I device is present. .PP The .B \-t flag causes the data to be reported in tabular form. The .B \-h flag produces a histogram of the data on the printer. Default is .BR \-t . .SH EXAMPLE The command: .PP .RS \f3sadp \|\-d disk\|\-0 900 4 \f1.TH BESSEL 3M .SH NAME j0, j1, jn, y0, y1, yn \- Bessel functions .SH SYNOPSIS .nf .B #include .PP .BR "double j0 (" x ) .BR "double " x ; .PP .BR "double j1 (" x ) .BR "double " x ; .PP .BR "double jn (" "n, x" ) .BR int " n" ; .BR double " x" ; .PP .BR "double y0 (" x ) .BR double " x" ; .PP .BR "double y1 (" x ) .BR double " x" ; .PP .BR "double yn (" "n, x" ) .BR int " n" ; .BR double " x" ; .SH DESCRIPTION .I J0\^ and .I j1\^ return Bessel functions of .I x\^ of the first kind of orders 0 and 1 respectively. .I Jn\^ returns the Bessel function of .I x\^ of the first kind of order .IR n . .PP .I Y0\^ and .I y1\^ return the Bessel functions of .I x\^ of the second kind of orders 0 and 1 respectively. .I Yn\^ returns the Bessel function of .I x\^ of the second kind of order .IR n . The value of .I x\^ must be positive. .SH DIAGNOSTICS Non-positive arguments cause .IR y0 , .IR "y1\^" , and .I yn\^ to return the value .SM .B HUGE and to set .I errno\^ to .SM .BR EDOM . They also cause a message indile [ number ]\fR. Pointers may be dereferenced by using the form \fIpointer\fB[\fR0\fB]\fR. Combinations of these forms may also be used. F77 common variables may be referenced by using the name of the common block instead of the structure name. Blank common variables may be named by the form .BI . variable\fR. A number may be used in place of a structure variable name, in which case the number is viewed as the address of the structure, and the template used for the structure is that of the last structure referenced by .I sdb\fR. An unqualified structure variable may also be used with various commands. Generally, .I sdb interprets a structure as a set of variables; thus, it displays the values of all the elements of a structure when it is requested to display a structure. An exception to this interpretation occurs when displaying variable addresses. An entire structure does have an address, and it is this value .I sdb displays, not the addresses of individual elements. .P Elements of a multidimensional arrayD  .RE .PP generates 4 tabular reports, each describing cylinder usage and seek distance of disk drive 0 during a 15-minute interval. .SH FILES /dev/kmem .\" @(#)sadp.1 1.5 cating .SM DOMAIN error to be printed on the standard error output; the process will continue. .PP These error-handling procedures may be changed with the function .IR matherr (3M). .SH SEE ALSO matherr(3M). .\" @(#)bessel.3m 1.4  may be referenced as .IB variable [ number ][ number ]...\fR, or as .IB variable [ number,number,... ]\fR. In place of .I number\fR, the form .IB number ; number may be used to indicate a range of values, .B \(** may be used to indicate all legitimate values for that subscript, or subscripts may be omitted entirely if they are the last subscripts and the full range of values is desired. As with structures, .I sdb displays all the values of an array or of the section of an array if trailing subscripts are omitted. It displays only the address of the array itself or of the section specified by the user if subscripts are omitted. A multidimensional parameter in an F77 program cannot be displayed as an array, but it is actually a pointer, whose value is the location of the array. The array itself can be accessed symbolically from the calling function. .P A particular instance of a variable on the stack may be referenced by using the form .IB procedure : variable , number\fR. All the variations mentioned in namin.if t .ds ' \h@.05m@\s+4\v@.333m@\'\v@-.333m@\s-4\h@.05m@ .if n .ds ' ' .if t .ds ` \h@.05m@\s+4\v@.333m@\`\v@-.333m@\s-4\h@.05m@ .if n .ds ` ` .TH SAG 1G .SH NAME sag \- system activity graph .SH SYNOPSIS .B "sag " [ options ] .SH DESCRIPTION .I Sag graphically displays the system activity data stored in a binary data file by a previous .IR sar (1) run. Any of the .I sar data items may be plotted singly, or in combination; as cross plots, or versus time. Simple arithmetic combinations of data may be specified. .I Sag invokes .I sar and finds the desired data by string-matching the data column header (run .I sar to see what's available). The following \fIoptions\fP may be passed to .IR sar : .TP 9 \fB\-s \fItime\fR Select data later than .I time in the form hh\|[\^:mm\^]\^. Default is 08:00. .TP 9 \fB\-e \fItime\fR Select data up to .IR time . Default is 18:00. .TP 9 \fB\-i \fIsec\fR Select data at intervals as close as possible to \fIsec \fRseconds. .TP 9 \fB\-f \fIfile\fR Use \fIfile \fRas the data sourcD .TH BOOL 3F .SH NAME and, or, xor, not, lshift, rshift \- FORTRAN bitwise Boolean functions .SH SYNOPSIS .nf .BR "integer" " i, j, k" .BR "real" " a, b, c" .BR "double precision" " dp1, dp2, dp3" .PP .RB "k" " = and(" "i, j" ")" .RB "c" " = or(" "a, b" ")" .RB "j" " = xor(" "i, a" ")" .RB "j" " = not(" "i" ")" .RB "k" " = lshift(" "i, j" ")" .RB "k" " = rshift(" "i, j" ")" .SH DESCRIPTION The generic intrinsic Boolean functions .IR and , .IR or , and .I xor\^ return the value of the binary operations on their arguments. .I Not\^ is a unary operator returning the one's complement of its argument. .I Lshift\^ and .I rshift\^ return the value of the first argument shifted left or right, respectively, the number of times specified by the second (integer) argument. .P The Boolean functions are generic, i.e., defined for all data types as arguments and return values. Where required, the compiler generates appropriate type conversions. .SH NOTE Although defined for all data types, use of Boolean functions on non-ig variables may be used. .IB Number\^ is the occurrence of the specified procedure on the stack, counting the top, or most current, as the first. If no procedure is specified, the procedure currently executing is used by default. .PP It is also possible to specify a variable by its address. All forms of integer constants which are valid in C may be used, so that addresses may be input in decimal, octal, or hexadecimal. .PP Line numbers in the source program are referred to as .IB file-name : number or .IB procedure : number\fR. In either case the number is relative to the beginning of the file. If no procedure or filename is given, the current file is used by default. If no number is given, the first line of the named procedure or file is used. .PP While a process is running under .IR sdb all addresses refer to the executing program; otherwise they refer to .I objfil\^ or .I corfil\^. An initial argument of .B \-w permits overwriting locations in .I objfil\^. .SS Addresses. The address in a file associated we for \fIsar\fR. Default is the current daily data file \fB/usr/adm/sa/sa\fIdd\fR. .P Other \fIoptions\fP: .TP 9 \fB\-T \fIterm\fR Produce output suitable for terminal \fIterm\fR. See \fItplot\fR(1G) for known terminals. If .I term is .BR vpr , output is processed by .B vpr \-p and queued to a Versatec printer. Default for .I term is .BR \s-1$TERM\s+1 . .TP 9 .BI "\-x\0" spec x axis specification with .I spec in the form: .RS "name\|[op \|name]\|.\|.\|.\|[lo \|hi]" .RE .TP 9 .BI "\-y\0" spec y axis specification with .I spec in the same form as above. .P \fIName\fR is either a string that matches a column header in the \fIsar \fR report, with an optional device name in square brackets, e.g., \fBr+w/s[dsk\-1]\fR, or an integer value. \fIOp \fR is \fB + \- \(**\fR or \fB/ \fRsurrounded by blanks. Up to five names may be specified. Parentheses are not recognized. Contrary to custom, .BR "\0+\0" "and" "\0\-\0" have precedence over .BR "\0\(**\0" "and" "\0/" "." Evaluation is left to right. Thus A\0/\0A\0+\0B\0\(*nteger data is not productive. .SH BUGS The implementation of the shift functions may cause large shift values to deliver unexpected results. .\" @(#)bool.3f 1.5 E ith a written address is determined by a mapping associated with that file. Each mapping is represented by two triples .RI ( "b1, e1, f1" ) and .RI ( "b2, e2, f2" ). The .I file address\^ corresponding to a written .I address\^ is calculated as follows: .PP .RS .IR b1 \*(LE address < e1 \*(IM .IR "file address" = address + f1\-b1 .RE otherwise .PP .RS .IR b2 \*(LE address < e2 \*(IM .IR "file address" = address + f2\-b2, .RE .PP otherwise, the requested .I address\^ is not legal. In some cases (e.g., for programs with separated I and D space) the two segments for a file may overlap. .PP The initial setting of both mappings is suitable for normal .B a.out and .B core files. If either file is not of the kind expected then, for that file, .I b1\^ is set to 0, .I e1\^ is set to the maximum file size, and .I f1\^ is set to 0; in this way the whole file can be examined with no address translation. .PP In order for .I sdb\^ to be used on large files, all appropriate values are kept as signed 32-bit integers. .SS C*\0100 is evaluated (A/(A+B))\(**100, and A\0+\0B\0/\0C\0+\0D is (A+B)/(C+D). .IR "Lo " "and " "hi " are optional numeric scale limits. If unspecified, they are deduced from the data. .P A single .I spec is permitted for the x axis. If unspecified, \fItime\fP is used. Up to 5 \fIspec\fR's separated by .B \|;\| may be given for .BR \-y . Enclose the .BR "\-x " "and " "\-y" arguments in double quotes (\fB"\|"\fR) if blanks or \fB\\\fR<\s-1CR\s+1> are included. The .B \-y default is: .PP .RS 0 \fB\-y\0"%usr\00\0100;\0%usr\0+\0%sys\00\0100;\0%usr\0+\0%sys\0+\0%wio\00\0100"\fR .RE .SH EXAMPLES To see today's .SM CPU utilization: .RS \f3sag\f1 .RE .P To see activity over 15 minutes of all disk drives: .RS \f3TS=\*`date\0+%H:%M\*`\f1 .br \f3sar\0\-o\0tempfile\060\015\f1 .br \f3TE=\*`date\0+%H:%M\*`\f1 .br \f3sag\0\-f\0tempfile\0\-s\0$TS\0\-e\0$TE\0\-y\0"r+w/s[dsk]"\f1 .RE .SH FILES .TP 22 /usr/adm/sa/sa\fIdd\fR daily data file for day \fIdd\fR. .SH SEE ALSO sar(1), tplot(1G). .\" @(#)sag.1g 1.4 .TH BSEARCH 3C .SH NAME bsearch \- binary search .SH SYNOPSIS .BR "char \(**bsearch ((char \(**)" " key" ", (char \(**)" " base, nel, sizeof" .BR " (\(**" "key" ")," " compar" ")" .br .BR unsigned " nel" ; .br .BR "int (\(**" "compar" ")( );" .SH DESCRIPTION .I Bsearch\^ is a binary search routine generalized from Knuth (6.2.1) Algorithm B. It returns a pointer into a table indicating where a datum may be found. The table must be previously sorted in increasing order according to a provided comparison function. .I Key\^ points to the datum to be sought in the table. .I Base\^ points to the element at the base of the table. .I Nel\^ is the number of elements in the table. .I Compar\^ is the name of the comparison function, which is called with two arguments that point to the elements being compared. The function must return an integer less than, equal to, or greater than zero, depending on whether the first argument is to be considered less than, equal to, or greater than the second. .SH DIAGNOSTICS A .SM .B ommands. .PP The commands for examining data in the program are: .TP 5 .B t Print a stack trace of the terminated or halted program. .TP 5 .B T Print the top line of the stack trace. .TP 5 .IB variable / clm Print the value of .I variable\^ according to length .I l\^ and format .IR m . A numeric count .I c indicates that a region of memory, beginning at the address implied by .IR variable , is to be displayed. The length specifiers are: .RS .RS .PD 0 .TP .BI b\^ one byte .TP .BI h\^ two bytes (half word) .TP .BI l\^ four bytes (long word) .RE .PD .br .ne 5 .PP Legal values for .I m\^ are: .RS .PD 0 .TP .BI c\^ character .TP .BI d\^ decimal .TP .BI u\^ decimal, unsigned .TP .BI o\^ octal .TP .BI x\^ hexadecimal .TP .BI f\^ 32-bit single precision floating point .TP .BI g\^ 64-bit double precision floating point .TP .BI s\^ Assume .I variable\^ is a string pointer and print characters starting at the address pointed to by the variable. .TP .BI a\^ Print characters starting at the variable's address. This formaE .TH SAR 1 .SH NAME sar \- system activity reporter .SH SYNOPSIS .B sar .RB [\| \-ubdycwaqvmA\| ] .RB [\| \-o\0 file\|] t [ n ] .PP .B sar .RB [\| \-ubdycwaqvmA\| ] .RB [\| \-s\0 time\|] .RB [\| \-e\0 time\|] .RB [\| \-i\0 sec\|] .RB [\| \-f\0 file\|] .SH DESCRIPTION .IR Sar, in the first instance, samples cumulative activity counters in the operating system at .I n intervals of .I t seconds. If the .B \-o option is specified, .I sar saves the samples in .I file in binary format. The default value of .I n is 1. In the second instance, with no sampling interval specified, .I sar extracts data from a previously recorded .IR file, either the one specified by the .B \-f option or, by default, the standard system activity daily data file .BI /usr/adm/sa/sa dd\^ for the current day .IR dd. The starting and ending times of the report can be bounded via the .B \-s and .B \-e .I time arguments of the form .IR hh [: mm [: ss ]].\^ The .B \-i option selects records at .I sec second intervals; otherwise, all intervals foNULL pointer is returned if the key cannot be found in the table. .SH NOTES The pointers to the key and the element at the base of the table should be of type pointer-to-element, and cast to type pointer-to-character. .br The comparison function need not compare every byte, so arbitrary data may be contained in the elements in addition to the values being compared. .br Although declared as type pointer-to-character, the value returned should be cast into type pointer-to-element. .SH SEE ALSO lsearch(3C), hsearch(3C), qsort(3C), tsearch(3C). .\" @(#)bsearch.3c 1.6 t may not be used with register variables. .TP .BI p\^ pointer to procedure .TP .BI i\^ Disassemble machine-language instruction with addresses printed numerically and symbolically. .TP .BI I\^ Disassemble machine-language instruction with addresses printed numerically only. .RE .PD The length specifiers are only effective with the formats \fBc\fP, \fBd\fP, \fBu\fP, \fBo\fP and \fBx\fP. Any of the specifiers, \fIc\fP, \fIl\fP, and \fIm\fP, may be omitted. If all are omitted, .I sdb chooses a length and a format suitable for the variable's type, as declared in the program. If .I m is specified, then this format is used for displaying the variable. A length specifier determines the output length of the value to be displayed, sometimes resulting in truncation. A count specifier .I c tells .I sdb to display that many units of memory, beginning at the address of .IR variable . The number of bytes in one such unit of memory is determined by the length specifier .IR l , or, if no length is given, by the size associaund in the data file are reported. .PP In either case, subsets of data to be printed are specified by the following options: .PP .PD 0 .TP 5 .B \-u Report .SM CPU utilization (the default): .br %usr, %sys, %wio, %idle \- portion of time running in user mode, running in system mode, idle with some process waiting for block .SM I/O, and otherwise idle. .sp .TP .B \-b Report buffer activity: .br bread/s, bwrit/s \- transfers per second of data between system buffers and disk or other block devices; .br lread/s, lwrit/s \- accesses of system buffers; .br %rcache, %wcache \- cache hit ratios, e. g., 1 \- bread/lread; .br pread/s, pwrit/s \- transfers via raw (physical) device mechanism. .sp .TP .B \-d Report activity for each block device, e. g., disk or tape drive: .br %busy, avque \- portion of time device was busy servicing a transfer request, average number of requests outstanding during that time; .br r+w/s, blks/s \- number of data transfers from or to device, number of bytes transferred in 512-byte units; F .\" @(#)cabs.3f 1.2 .so /usr/man/u_man/man3/abs.3f ted with the .IR variable. If a count specifier is used for the .B s or .B a command, then that many characters are printed. Otherwise successive characters are printed until either a null byte is reached or 128 characters are printed. The last variable may be redisplayed with the command .BR ./ . .PP The .IR sh (1) metacharacters .B \(** and .B ? may be used within procedure and variable names, providing a limited form of pattern matching. If no procedure name is given, variables local to the current procedure and global variables are matched; if a procedure name is specified, only variables local to that procedure are matched. To match only global variables, the form .BI : pattern\^ is used. .RE .TP 5 .PD 0 .IB linenumber ? lm .TP 5 \fIvariable:\fB?\fIlm\fR .PD Print the value at the address from .BR a.out or I space given by .I linenumber\^ or .IR variable (procedure name), according to the format .IR lm . The default format is `i'. .TP 5 .PD 0 .IB variable = lm .TP 5 .IB linenumber = lm .TP 5 .IB number .br avwait, avserv \- average time in ms. that transfer requests wait idly on queue, and average time to be serviced (which for disks includes seek, rotational latency and data transfer times). .sp .TP .B \-y Report TTY device activity: .br rawch/s, canch/s, outch/s \- input character rate, input character rate processed by canon, output character rate; .br rcvin/s, xmtin/s, mdmin/s \- receive, transmit and modem interrupt rates. .sp .TP .B \-c Report system calls: .br scall/s \- system calls of all types; .br sread/s, swrit/s, fork/s, exec/s \- specific system calls; .br rchar/s, wchar/s \- characters transferred by read and write system calls. .sp .TP .B \-w Report system swapping and switching activity: .br swpin/s, swpot/s, bswin/s, bswot/s \- number of transfers and number of 512-byte units transferred for swapins (including initial loading of some programs) and swapouts; .br pswch/s \- process switches. .sp .TP .B \-a Report use of file access system routines: .br iget/s, namei/s, dirblk/s. .sp .TP ..\" @(#)calloc.3c 1.2 .so /usr/man/u_man/man3/malloc.3c F = lm .PD Print the address of .I variable\^ or .IR linenumber , or the value of .IR number , in the format specified by .IR lm . If no format is given, then .B lx is used. The last variant of this command provides a convenient way to convert between decimal, octal and hexadecimal. .TP 5 .IB variable ! value Set .I variable\^ to the given .IR value . The value may be a number, a character constant or a variable. The value must be well defined; expressions that produce more than one value, such as structures, are not allowed. Character constants are denoted .BI ' character\fR. Numbers are viewed as integers unless a decimal point or exponent is used. In this case, they are treated as having the type double. Registers are viewed as integers. The .I variable may be an expression that indicates more than one variable, such as an array or structure name. If the address of a variable is given, it is regarded as the address of a variable of type .IR int . C conventions are used in any type conversions necessary to peB \-q Report average queue length while occupied, and % of time occupied: .br runq-sz, %runocc \- run queue of processes in memory and runnable; .br swpq-sz, %swpocc \- swap queue of processes swapped out but ready to run. .sp .TP .B \-v Report status of text, process, inode and file tables: .br text-sz, proc-sz, inod-sz, file-sz \- entries/size for each table, evaluated once at sampling point; .br text-ov, proc-ov, inod-ov, file-ov \- overflows occurring between sampling points. .sp .TP .B \-m Report message and semaphore activities: .br msg/s, sema/s \- primitives per second. .sp .TP .B \-A Report all data. Equivalent to .BR \-udqbwcayvm . .SH EXAMPLES To see today's .SM CPU activity so far: .PP .RS .B sar .RE .PP To watch .SM CPU activity evolve for 10 minutes and save data: .PP .RS .B "sar \|\-o temp 60 10" .RE .PP To later review disk and tape activity from that period: .PP .RS .B "sar \|\-d \|\-f temp" .RE .SH FILES .TP 18 .RI /usr/adm/sa/sa dd\^ daily data file, where .I dd\^ are digits representing t.\" @(#)ccos.3f 1.2 .so /usr/man/u_man/man3/cos.3f 8;>ADGJMPG 2}zwtqnkheb_\Y|yvspmjgda^[X{xurolifc`]ZWTQNKHEB?<9.\" @(#)ceil.3m 1.2 .so /usr/man/u_man/man3/floor.3m rform the indicated assignment. .TP 5 .B x Print the machine registers and the current machine-language instruction. .TP 5 .B X Print the current machine-language instruction. .PP The commands for examining source files are: .PP .PD 0 .TP 5 .BI "e " procedure\^ .TP 5 .BI "e " file-name\^ .TP 5 .BI "e " directory/\^ .TP 5 .BI "e " "directory file-name"\^ .PD The first two forms set the current file to the file containing .I procedure\^ or to .IR file-name . The current line is set to the first line in the named procedure or file. Source files are assumed to be in .IR directory . The default is the current working directory. The latter two forms change the value of .IR directory . If no procedure, filename, or directory is given, the current procedure name and filename are reported. .TP 5 .BI / "regular expression" / Search forward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B / may be elided. .TP 5 .BI ? "regular expression" ? Search ba.TH SCAT 1 .SH NAME scat \- concatenate and print files on synchronous printer .SH SYNOPSIS .B scat [ .B \-u ] [ .B \-s ] file .\|.\|. .SH DESCRIPTION .I Scat\^ reads each .I file\^ in sequence and writes it on the standard output, which is assumed to be a synchronous printer device. Thus: .PP .RS .B "scat file > /dev/sp0" .RE .PP prints the file, and: .PP .RS .B "scat file1 file2 > /dev/sp0" .RE .PP concatenates .I file1\^ and .I file2\^ and places the result on the printer. .PP If no input file is given, or if the argument .B \- is encountered, .I scat\^ reads from the standard input file. Output is buffered in 512-byte blocks unless the .B \-u option is specified. The .B \-s option makes .I scat\^ silent about non-existent files. .SH SEE ALSO cp(1), pr(1), stty(1). .SH WARNINGS .I Scat\^ uses synchronous printers in line mode with the wrap around option enabled. This means that the maximum line length is 79 characters; longer lines are wrapped back to the beginning of the next line each time the end of a pG .\" @(#)cexp.3f 1.2 .so /usr/man/u_man/man3/exp.3f ckward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B ? may be elided. .TP 5 .B p Print the current line. .TP 5 .B z Print the current line followed by the next 9 lines. Set the current line to the last line printed. .TP 5 .B w Window. Print the 10 lines around the current line. .TP 5 .I number\^ Set the current line to the given line number. Print the new current line. .TP 5 .IB count + Advance the current line by .I count\^ lines. Print the new current line. .TP 5 .IB count \(mi Retreat the current line by .I count\^ lines. Print the new current line. .PP The commands for controlling the execution of the source program are: .PP .TP 5 \fIcount\fB r \fIargs\fR .br .ns .TP 5 \fIcount\fB R Run the program with the given arguments. The \fBr\fP command with no arguments reuses the previous arguments to the program while the \fBR\fP command runs the program with no arguments. An argument beginning with .B < or .B > causes redirection for the rinter line is reached. .\" @(#)scat.1 1.3 .\" @(#)char.3f 1.2 .so /usr/man/u_man/man3/ftype.3f H standard input or output respectively. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fIlinenumber\fB c\fI count\fR .br .ns .TP 5 \fIlinenumber\fB C\fI count\fR Continue after a breakpoint or interrupt. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. \fBC\fP continues with the signal that caused the program to stop reactivated and \fBc\fP ignores it. If a linenumber is specified then a temporary breakpoint is placed at the line and execution is continued. The breakpoint is deleted when the command finishes. .TP 5 \fIlinenumber\fB g\fI count\fR Continue after a breakpoint with execution resumed at the given line. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fBs \fIcount\fR .br .ns .TP 5 \fBS \fIcount\fR Single step the program through \fIcount\fP lines. If no count is given then the program is run for one line. .B S is equivalent to .B s except it steps through procedure calls. .TP 5 \fBi\fR .br .ns ..TH SCC 1 .SH NAME scc \- C compiler for stand-alone programs .SH SYNOPSIS .B scc [ .B +\c [ lib ] ] [ option ] ... [ file ] ... .SH DESCRIPTION .I Scc\^ prepares the named files for stand-alone execution. The .I option\^ and .I file\^ arguments may be anything that can legally be used with the .I cc\^ command; it should be noted, though, that the .B \-p (profiling) option, as well as any object module that contains system calls, causes the executable not to run. .PP .I Scc\^ defines the compiler constant, .BR \s-1STANDALONE\s+1 , so that sections of C programs may be compiled conditionally when the executable is run stand-alone. .PP The first argument specifies an auxiliary library that defines the device configuration of the computer for which the stand-alone executable is being prepared. .I Lib\^ may be one of the following: .TP 8 .B A .SM RP\*S04/05/06 disk and .SM TU\*S16 magnetic tape, or equivalent on the \s-1PDP\s+1-11 plus \s-1RM\s+105 and \s-1RM\s+180 disks, and \s-1TU\s+178 and \s-1TS\s+111 tapes, .\" @(#)clearerr.3s 1.2 .so /usr/man/u_man/man3/ferror.3s TP 5 \fBI\fR Single step by one machine-language instruction. \fBI\fP steps with the signal that caused the program to stop reactivated and \fBi\fP ignores it. .TP 5 \fIvariable$\fBm \fIcount\fR .br .ns .TP 5 \fIaddress:\fBm \fIcount\fR Single step (as with \fBs\fP) until the specified location is modified with a new value. If \fIcount\fP is omitted, it is effectively infinity. \fIVariable\fR must be accessible from the current procedure. Since this command is done by software, it can be very slow. .TP 5 \fIlevel\fB v \fR Toggle verbose mode, for use when single stepping with \fBS\fP, \fBs\fP or \fBm\fP. If \fIlevel\fP is omitted, then just the current source file and/or subroutine name is printed when either changes. If \fIlevel\fP is 1 or greater, each C source line is printed before it is executed; if \fIlevel\fP is 2 or greater, each assembler statement is also printed. A \fBv\fP turns verbose mode off if it is on for any level. .TP 5 .B k Kill the program being debugged. .TP 5 procedure\fB(\fParg1,arg2,.H or equivalent .TP .B B \s-1RK\s+111/\s-1RK\s+105 disk, \s-1RP\s+111/\s-1RP\s+103 disk, and \s-1TM\s+111/\s-1TU\s+116 magnetic tape, or equivalent .PP If no .BI + lib\^ argument is specified, .B +A is assumed. If the .B + argument is specified alone, no configuration library is loaded unless the user supplies his own. .SH FILES .nr t1 \w'/usr/lib/lib2A.a ' .nr t2 \n(t1+\w'+A configuration library ' .ta \n(t1u \n(t2u /lib/crt2.o execution start-off .br /usr/lib/lib2.a stand-alone library .br /usr/lib/lib2A.a +A configuration library (\s-1PDP\s+1-11 only) .br /usr/lib/lib2B.a +B configuration library (\s-1PDP\s+1-11 only) .SH SEE ALSO cc(1), ld(1), a.out(4). .\" @(#)scc.1 1.4 .TH CLOCK 3C .SH NAME clock \- report CPU time used .SH SYNOPSIS .B long clock ( ) .SH DESCRIPTION .I Clock\^ returns the amount of CPU time (in microseconds) used since the first call to .IR clock . The time reported is the sum of the user and system times of the calling process and its terminated child processes for which it has executed .IR wait (2) or .IR system (3S). .PP The resolution of the clock is 16.667 milliseconds on M68000 or DEC processors. .SH SEE ALSO times(2), wait(2), system(3S). .SH BUGS The value returned by .I clock\^ is defined in microseconds for compatibility with systems that have CPU clocks with much higher resolution. Because of this, the value returned wraps around after accumulating only 2,147 seconds of CPU time (about 36 minutes). .\" @(#)clock.3c 1.4 ..\fB)\fP .br .ns .TP 5 procedure\fB(\fParg1,arg2,...\fB)/\fP\fIm\fP Execute the named procedure with the given arguments. Arguments can be integer, character or string constants or names of variables accessible from the current procedure. The second form causes the value returned by the procedure to be printed according to format \fIm\fP. If no format is given, it defaults to .BR d . .TP 5 \fIlinenumber\fB b\fR \fIcommands\fR Set a breakpoint at the given line. If a procedure name without a line number is given (e.g., \fBproc:\fR), a breakpoint is placed at the first line in the procedure even if it was not compiled with the .B \-g option. If no \fIlinenumber\fP is given, a breakpoint is placed at the current line. If no .I commands\^ are given, execution stops just before the breakpoint and control is returned to .IR sdb . Otherwise the .I commands\^ are executed when the breakpoint is encountered and execution continues. Multiple commands are specified by separating them with semicolons. If \fBk\fP is use.TH SCCSDIFF 1 .SH NAME sccsdiff \- compare two versions of an \s-1SCCS\s+1 file .SH SYNOPSIS .B sccsdiff .BR \-r \s-1SID\s+1\&1 .BR \-r \s-1SID\s+1\&2 .RB [ \-p ] .RB [ \-s n] files .SH DESCRIPTION .I Sccsdiff\^ compares two versions of an .SM SCCS file and generates the differences between the two versions. Any number of .SM SCCS files may be specified, but arguments apply to all files. .RS 5 .TP 12 .BI \-r \s-1SID\s+1?\^ .IR \s-1SID\s+11 \ and \ \s-1SID\s+12 \ specify the deltas of an .SM SCCS file that are to be compared. Versions are passed to .IR bdiff (1) in the order given. .TP 12 .B \-p pipe output for each file through .IR pr (1). .TP 12 .BI \-s n\^ \fIn\fP is the file segment size that .I bdiff\^ will pass to .IR diff (1). This is useful when .I diff\^ fails due to a high system load. .SH FILES .TP "\w'/tmp/get?????\ \ 'u" /tmp/get????? Temporary files .SH "SEE ALSO" bdiff(1), get(1), help(1), pr(1). .br ``Source Code Control System'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS .I file: .B "NI .\" @(#)clog.3f 1.2 .so /usr/man/u_man/man3/log.3f d as a command to execute at a breakpoint, control returns to .IR sdb , instead of continuing execution. .TP 5 .B B Print a list of the currently active breakpoints. .TP 5 \fIlinenumber\fB d\fR Delete a breakpoint at the given line. If no \fIlinenumber\fP is given, the breakpoints are deleted interactively. Each breakpoint location is printed and a line is read from the standard input. If the line begins with a .B y or .B d , the breakpoint is deleted. .TP 5 .B D Delete all breakpoints. .TP 5 .B l Print the last executed line. .TP 5 \fIlinenumber\fB a\fR Announce. If \fIlinenumber\fR is of the form .IB proc : number\fR, the command effectively does a .IB "linenumber " "b l\fR. If \fIlinenumber\fR is of the form .IB proc :\fR, the command effectively does a .IB proc ": b T"\fR. .PP Miscellaneous commands: .TP 5 .BI ! command\^ The command is interpreted by .IR sh (1). .TP 5 .B new-line If the previous command printed a source line, advance the current line by one line and print the new current line. If the preo differences" means the two versions are the same. .sp Use .IR help (1) for explanations. .PD .\" @(#)sccsdiff.1 1.6 .\" @(#)cmplx.3f 1.2 .so /usr/man/u_man/man3/ftype.3f I vious command displayed a memory location, display the next memory location. .TP 5 .B control-D Scroll. Print the next 10 lines of instructions, source, or data, depending on which was printed last. .TP 5 .BI "< " filename Read commands from .I filename until the end of file is reached, then continue to accept commands from standard input. When .I sdb is told to display a variable by a command in such a file, the variable name is displayed along with the value. This command may not be nested; .B < may not appear as a command in a file. .TP 5 .B M Print the address maps. .TP 5 .BR M\ [ ?/ ][ \(** "] \fIb \|e \|f\fP" Record new values for the address map. The arguments \fB?\fP and \fB/\fP specify the text and data maps, respectively. The first segment, .RI ( "b1, e1, f1" ), is changed unless \fB\(**\fP is specified, in which case the second segment, .RI ( "b1, e1, f1" ), of the mapping is changed. If fewer than three values are given, the remaining map parameters are left unchanged. .TP 5 \fB"\fI string\fR Prin.TH SDB 1 .SH NAME sdb \- symbolic debugger .SH SYNOPSIS .B sdb [\fB\-w\fR] [\fB\-W\fR] [ objfil [ corfil [ directory ] ] ] .SH DESCRIPTION .I Sdb\^ is a symbolic debugger which can be used with C and F77 programs. It may be used to examine their object files and core files and to provide a controlled environment for their execution. .PP .I Objfil\^ is normally an executable program file which has been compiled with the .B \-g (debug) option; if it has not been compiled with the .B \-g option, or if it is not an executable file, the symbolic capabilities of .I sdb\^ are limited, but the file can still be examined and the program debugged. The default for .I objfil\^ is .BR a.out . .I Corfil\^ is assumed to be a core image file produced after executing .IR objfil ; the default for .I corfil\^ is .BR core . The core file need not be present. A .B \- in place of .I corfil\^ forces .I sdb\^ to ignore any core image file. Source files used in constructing .I objfil\^ must be in .I directory to be located. .PP It i.TH CONJG 3F .SH NAME conjg, dconjg \- FORTRAN complex conjugate intrinsic function .SH SYNOPSIS .nf .BR "complex" " cx1, cx2" .BR "double complex" " dx1, dx2" .P .RB "cx2" " = conjg(" "cx1" ")" .P .RB "dx2" " = dconjg(" "dx1" ")" .SH DESCRIPTION .I Conjg\^ returns the complex conjugate of its complex argument. .I Dconjg\^ returns the double-complex conjugate of its double-complex argument. .\" @(#)conjg.3f 1.4 t the given string. The C escape sequences of the form .I "\\\\character" are recognized, where .I character is a nonnumeric character. .TP 5 .B q Exit the debugger. .PP The following commands also exist and are intended only for debugging the debugger: .PP .PD 0 .TP 5 .B V Print the version number. .TP 5 .B Q Print a list of procedures and files being debugged. .TP 5 .B Y Toggle debug output. .PD .SH FILES a.out .br core .SH SEE ALSO cc(1), f77(1), sh(1), a.out(4), core(4). .br .IR "\*(6) Programming Guide" . .SH WARNINGS On the .SM VAX\*S-11/780, C variables are identified internally with an underscore prepended. User variables which differ by only an initial underscore cannot be distinguished, as .I sdb recognizes both internal and external names. .PP Data stored in text sections are indistinguishable from functions. .PP Line number information in optimized functions is unreliable, and some information may be missing. .SH BUGS If a procedure is called when the program is .I not\^ stopped at a breakpoint (sJ s useful to know that at any time there is a .I "current line\^" and .IR "current file" . If .I corfil\^ exists then they are initially set to the line and file containing the source statement at which the process terminated. Otherwise, they are set to the first line in .BR main (). The current line and file may be changed with the source file examination commands. .PP By default, warnings are provided if the source files used in producing .I objfil cannot be found or are newer than .IR objfil . This checking feature and the accompanying warnings may be disabled by the use of the .B \-W flag. .PP Names of variables are written just as they are in C or F77. Variables local to a procedure may be accessed using the form .IB procedure : variable\fR. If no procedure name is given, the procedure containing the current line is used by default. .P It is also possible to refer to structure members as .IB variable . member\fR, pointers to structure members as .IB variable \(mi> member , and array elements as .IB variab.TH CONV 3C .SH NAME toupper, tolower, _toupper, _tolower, toascii \- translate characters .SH SYNOPSIS .nf .B #include .PP .BR "int toupper (" c ) .BR int " c" ; .PP .BR "int tolower (" c ) .BR int " c" ; .PP .BR "int _toupper (" c ) .BR int " c" ; .PP .BR "int _tolower (" c ) .BR int " c" ; .PP .BR "int toascii (" c ) .BR int " c" ; .SH DESCRIPTION .I Toupper\^ and .I tolower\^ have as domain the range of .IR getc (3S): the integers from \-1 through 255. If the argument of .I toupper\^ represents a lowercase letter, the result is the corresponding uppercase letter. If the argument of .I tolower\^ represents an uppercase letter, the result is the corresponding lowercase letter. All other arguments in the domain are returned unchanged. .PP .I _toupper\^ and .I _tolower\^ are macros that accomplish the same thing as .I toupper\^ and .I tolower\^ but have restricted domains and are faster. .I _toupper\^ requires a lowercase letter as its argument; its result is the corresponding uppercase letter. .I _uch as when a core image is being debugged), all variables are initialized before the procedure is started. This makes it impossible to use a procedure which formats data from a core image. .PP The default type for printing F77 parameters is incorrect. Their address is printed instead of their value. .PP Tracebacks containing F77 subprograms with multiple entry points may print too many arguments in the wrong order, but their values are correct. .PP The range of an F77 array subscript is assumed to be .I 1 to .IR n , where .I n is the dimension corresponding to that subscript. This is only significant when the user omits a subscript, or uses .B \(** to indicate the full range. There is no problem in general with arrays having subscripts whose lower bounds are not 1. .\" @(#)sdb.1 1.6 le [ number ]\fR. Pointers may be dereferenced by using the form \fIpointer\fB[\fR0\fB]\fR. Combinations of these forms may also be used. F77 common variables may be referenced by using the name of the common block instead of the structure name. Blank common variables may be named by the form .BI . variable\fR. A number may be used in place of a structure variable name, in which case the number is viewed as the address of the structure, and the template used for the structure is that of the last structure referenced by .I sdb\fR. An unqualified structure variable may also be used with various commands. Generally, .I sdb interprets a structure as a set of variables; thus, it displays the values of all the elements of a structure when it is requested to display a structure. An exception to this interpretation occurs when displaying variable addresses. An entire structure does have an address, and it is this value .I sdb displays, not the addresses of individual elements. .P Elements of a multidimensional arrayJ tolower\^ requires an uppercase letter as its argument; its result is the corresponding lowercase letter. Arguments outside the domain cause undefined results. .PP .I Toascii\^ yields its argument with all bits turned off that are not part of a standard .SM ASCII character; it is intended for compatibility with other systems. .SH SEE ALSO ctype(3C), getc(3S). .\" @(#)conv.3c 1.4 .TH SDIFF 1 .SH NAME sdiff \- side-by-side difference program .SH SYNOPSIS .B sdiff [ options ... ] file1 file2 .SH DESCRIPTION .I Sdiff\^ uses the output of .IR diff (1) to produce a side-by-side listing of two files indicating those lines that are different. Each line of the two files is printed with a blank gutter between them if the lines are identical, a .B < in the gutter if the line only exists in .IR file1 , a .B > in the gutter if the line only exists in .IR file2 , and a .B | for lines that are different. .PP For example: .PP .RS 11 .nf x | y a a b < c < d d > c .fi .RE .PP The following options exist: .TP 11 .BI \-w " n\^" Use the next argument, .IR n , as the width of the output line. The default line length is 130 characters. .TP .BR \-l Only print the left side of any lines that are identical. .TP .BR \-s Do not print identical lines. .TP .BI \-o " output\^" Use the next argument, .IR output , as the name of a third file that is created as a user controlled merging of .I file1\^ and  may be referenced as .IB variable [ number ][ number ]...\fR, or as .IB variable [ number,number,... ]\fR. In place of .I number\fR, the form .IB number ; number may be used to indicate a range of values, .B \(** may be used to indicate all legitimate values for that subscript, or subscripts may be omitted entirely if they are the last subscripts and the full range of values is desired. As with structures, .I sdb displays all the values of an array or of the section of an array if trailing subscripts are omitted. It displays only the address of the array itself or of the section specified by the user if subscripts are omitted. A multidimensional parameter in an F77 program cannot be displayed as an array, but it is actually a pointer, whose value is the location of the array. The array itself can be accessed symbolically from the calling function. .P A particular instance of a variable on the stack may be referenced by using the form .IB procedure : variable , number\fR. All the variations mentioned in namin.TH COS 3F .SH NAME cos, dcos, ccos \- FORTRAN cosine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .B" "complex" " cx1, cx2" .P .RB "r2" " = cos(" "r1" ")" .P .RB "dp2" " = dcos(" "dp1" ")" .RB "dp2" " = cos(" "dp1" ")" .P .RB "cx2" " = ccos(" "cx1" ")" .RB "cx2" " = cos(" "cx1" ")" .SH DESCRIPTION .I Cos\^ returns the real cosine of its real argument. .I Dcos\^ returns the double-precision cosine of its double-precision argument. .I Ccos\^ returns the complex cosine of its complex argument. The generic form .I cos\^ may be used with impunity because its returned type is determined by that of its argument. .SH SEE ALSO trig(3M). .\" @(#)cos.3f 1.5 K .IR file2 . Identical lines of .I file1\^ and .I file2\^ are copied to .IR output . Sets of differences produced by .IR diff (1) are printed, where a set of differences share a common gutter character. After printing each set of differences, .I sdiff\^ prompts the user with a .B % and waits for one of the following user-typed commands: .PP .RS 19 .TP .B l append the left column to the output file .TP .B r append the right column to the output file .TP .B s turn on silent mode; do not print identical lines .TP .B v turn off silent mode .TP .B "e l" call the editor with the left column .TP .B "e r" call the editor with the right column .TP .B "e b" call the editor with the concatenation of left and right .TP .B e call the editor with a zero length file .TP .B q exit from the program .RE .sp .2i .RS 11 On exit from the editor, the resulting file is concatenated on the end of the .I output\^ file. .RE .SH SEE ALSO diff(1), ed(1). .\" @(#)sdiff.1 1.3 g variables may be used. .IB Number\^ is the occurrence of the specified procedure on the stack, counting the top, or most current, as the first. If no procedure is specified, the procedure currently executing is used by default. .PP It is also possible to specify a variable by its address. All forms of integer constants which are valid in C may be used, so that addresses may be input in decimal, octal, or hexadecimal. .PP Line numbers in the source program are referred to as .IB file-name : number or .IB procedure : number\fR. In either case the number is relative to the beginning of the file. If no procedure or filename is given, the current file is used by default. If no number is given, the first line of the named procedure or file is used. .PP While a process is running under .IR sdb all addresses refer to the executing program; otherwise they refer to .I objfil\^ or .I corfil\^. An initial argument of .B \-w permits overwriting locations in .I objfil\^. .SS Addresses. The address in a file associated wvious command displayed a memory location, display the next memory location. .TP 5 .B control-D Scroll. Print the next 10 lines of instructions, source, or data, depending on which was printed last. .TP 5 .BI "< " filename Read commands from .I filename until the end of file is reached, then continue to accept commands from standard input. When .I sdb is told to display a variable by a command in such a file, the variable name is displayed along with the value. This command may not be nested; .B < may not appear as a command in a file. .TP 5 .B M Print the address maps. .TP 5 .BR M\ [ ?/ ][ \(** "] \fIb \|e \|f\fP" Record new values for the address map. The arguments \fB?\fP and \fB/\fP specify the text and data maps, respectively. The first segment, .RI ( "b1, e1, f1" ), is changed unless \fB\(**\fP is specified, in which case the second segment, .RI ( "b1, e1, f1" ), of the mapping is changed. If fewer than three values are given, the remaining map parameters are left unchanged. .TP 5 \fB"\fI string\fR Princommand. The command name is passed as argument 0 (see .IR exec (2)). The .I value\^ of a simple-command is its exit status if it terminates normally, or (octal) 200+\f2status\^\fP if it terminates abnormally (see .IR signal (2) for a list of status values). .PP A .I pipeline\^ is a sequence of one or more .I commands\^ separated by .B \(bv (or, for historical compatibility, by ^). The standard output of each command except the last one is connected by a .IR pipe (2) to the standard input of the next command. Each command is run as a separate process; the shell waits for the last command to terminate. .PP A .I list\^ is a sequence of one or more pipelines separated by .BR ; , .BR & , .BR && , or .BR \(bv\|\(bv , and optionally terminated by .B ; or .BR & . Of these four symbols, .B ; and .B & have equal precedence, which is lower than that of .B && and .BR \(bv\|\(bv . The symbols .B && and .B \(bv\|\(bv also have equal precedence. A semicolon .RB ( ; ) causes sequential execution of the preceding pipeline; aK ith a written address is determined by a mapping associated with that file. Each mapping is represented by two triples .RI ( "b1, e1, f1" ) and .RI ( "b2, e2, f2" ). The .I file address\^ corresponding to a written .I address\^ is calculated as follows: .PP .RS .IR b1 \*(LE address < e1 \*(IM .IR "file address" = address + f1\-b1 .RE otherwise .PP .RS .IR b2 \*(LE address < e2 \*(IM .IR "file address" = address + f2\-b2, .RE .PP otherwise, the requested .I address\^ is not legal. In some cases (e.g., for programs with separated I and D space) the two segments for a file may overlap. .PP The initial setting of both mappings is suitable for normal .B a.out and .B core files. If either file is not of the kind expected then, for that file, .I b1\^ is set to 0, .I e1\^ is set to the maximum file size, and .I f1\^ is set to 0; in this way the whole file can be examined with no address translation. .PP In order for .I sdb\^ to be used on large files, all appropriate values are kept as signed 32-bit integers. .SS Ct the given string. The C escape sequences of the form .I "\\\\character" are recognized, where .I character is a nonnumeric character. .TP 5 .B q Exit the debugger. .PP The following commands also exist and are intended only for debugging the debugger: .PP .PD 0 .TP 5 .B V Print the version number. .TP 5 .B Q Print a list of procedures and files being debugged. .TP 5 .B Y Toggle debug output. .PD .SH FILES a.out .br core .SH SEE ALSO cc(1), f77(1), sh(1), a.out(4), core(4). .br .IR "\*(6) Programming Guide" . .SH WARNINGS On the .SM VAX\*S-11/780, C variables are identified internally with an underscore prepended. User variables which differ by only an initial underscore cannot be distinguished, as .I sdb recognizes both internal and external names. .PP Data stored in text sections are indistinguishable from functions. .PP Line number information in optimized functions is unreliable, and some information may be missing. .SH BUGS If a procedure is called when the program is .I not\^ stopped at a breakpoint (sn ampersand .RB ( & ) causes asynchronous execution of the preceding pipeline (i.e., the shell does .I not\^ wait for that pipeline to finish). The symbol .B && .RB (\| \(bv\|\(bv \^) causes the .I list\^ following it to be executed only if the preceding pipeline returns a zero (non-zero) exit status. An arbitrary number of new-line characters may appear in a .IR list , instead of semicolons, to delimit commands. .PP A .I command\^ is either a simple-command or one of the following. Unless otherwise stated, the value returned by a command is that of the last simple-command executed in the command. .PP .PD 0 .TP \f3for\fP \f2name\^\fP \*(OK \f3in\fP \f2word\^\fP .\|.\|. \*(CK \f3do\fP \f2list\^\fP \f3done\fP Each time a .B for command is executed, .I name\^ is set to the next .I word\^ taken from the .B in .I word\^ list. If .BI in " word\^" \&.\|.\|. is omitted, then the .B for command executes the \f3do\fP \f2list\^\fP once for each positional parameter that is set (see .I "Parameter Substitution\^" below). ommands. .PP The commands for examining data in the program are: .TP 5 .B t Print a stack trace of the terminated or halted program. .TP 5 .B T Print the top line of the stack trace. .TP 5 .IB variable / clm Print the value of .I variable\^ according to length .I l\^ and format .IR m . A numeric count .I c indicates that a region of memory, beginning at the address implied by .IR variable , is to be displayed. The length specifiers are: .RS .RS .PD 0 .TP .BI b\^ one byte .TP .BI h\^ two bytes (half word) .TP .BI l\^ four bytes (long word) .RE .PD .br .ne 5 .PP Legal values for .I m\^ are: .RS .PD 0 .TP .BI c\^ character .TP .BI d\^ decimal .TP .BI u\^ decimal, unsigned .TP .BI o\^ octal .TP .BI x\^ hexadecimal .TP .BI f\^ 32-bit single precision floating point .TP .BI g\^ 64-bit double precision floating point .TP .BI s\^ Assume .I variable\^ is a string pointer and print characters starting at the address pointed to by the variable. .TP .BI a\^ Print characters starting at the variable's address. This formaL uch as when a core image is being debugged), all variables are initialized before the procedure is started. This makes it impossible to use a procedure which formats data from a core image. .PP The default type for printing F77 parameters is incorrect. Their address is printed instead of their value. .PP Tracebacks containing F77 subprograms with multiple entry points may print too many arguments in the wrong order, but their values are correct. .PP The range of an F77 array subscript is assumed to be .I 1 to .IR n , where .I n is the dimension corresponding to that subscript. This is only significant when the user omits a subscript, or uses .B \(** to indicate the full range. There is no problem in general with arrays having subscripts whose lower bounds are not 1. .\" @(#)sdb.1 1.6 Execution ends when there are no more words in the list. .TP \f3case\fP \f2word\^\fP \f3in\fP \*(OK \f2pattern\^\fP \*(OK \(bv \ \f2pattern\^\fP \*(CK .\|.\|. \f3)\fP \f2list\^\fP \f3;;\fP \*(CK .\|.\|. \f3esac\fP A .B case command executes the .I list\^ associated with the first .I pattern\^ that matches .IR word . The form of the patterns is the same as that used for filename generation (see .I "Filename Generation\^" below). .TP \f3if\fP \f2list\^\fP \f3then\fP \f2list\^\fP \*(OK \ \f3elif\fP \f2list\^\fP \f3then\fP \f2list\^\fP \*(CK .\|.\|. \ \*(OK \f3else\fP \f2list\^\fP \*(CK \f3f\&i\fP The .I list\^ following \f3if\fP is executed and, if it returns a zero exit status, the .I list\^ following the first .B then is executed. Otherwise, the .I list\^ following \f3elif\fP is executed and, if its value is zero, the .I list\^ following the next .B then is executed. Failing that, the .B else .I list\^ is executed. If no .B else .I list\^ or .B then .I list\^ is executed, then the .B if command returns a zerot may not be used with register variables. .TP .BI p\^ pointer to procedure .TP .BI i\^ Disassemble machine-language instruction with addresses printed numerically and symbolically. .TP .BI I\^ Disassemble machine-language instruction with addresses printed numerically only. .RE .PD The length specifiers are only effective with the formats \fBc\fP, \fBd\fP, \fBu\fP, \fBo\fP and \fBx\fP. Any of the specifiers, \fIc\fP, \fIl\fP, and \fIm\fP, may be omitted. If all are omitted, .I sdb chooses a length and a format suitable for the variable's type, as declared in the program. If .I m is specified, then this format is used for displaying the variable. A length specifier determines the output length of the value to be displayed, sometimes resulting in truncation. A count specifier .I c tells .I sdb to display that many units of memory, beginning at the address of .IR variable . The number of bytes in one such unit of memory is determined by the length specifier .IR l , or, if no length is given, by the size associa.TH SDIFF 1 .SH NAME sdiff \- side-by-side difference program .SH SYNOPSIS .B sdiff [ options ... ] file1 file2 .SH DESCRIPTION .I Sdiff\^ uses the output of .IR diff (1) to produce a side-by-side listing of two files indicating those lines that are different. Each line of the two files is printed with a blank gutter between them if the lines are identical, a .B < in the gutter if the line only exists in .IR file1 , a .B > in the gutter if the line only exists in .IR file2 , and a .B | for lines that are different. .PP For example: .PP .RS 11 .nf x | y a a b < c < d d > c .fi .RE .PP The following options exist: .TP 11 .BI \-w " n\^" Use the next argument, .IR n , as the width of the output line. The default line length is 130 characters. .TP .BR \-l Only print the left side of any lines that are identical. .TP .BR \-s Do not print identical lines. .TP .BI \-o " output\^" Use the next argument, .IR output , as the name of a third file that is created as a user controlled merging of .I file1\^ and L  exit status. .TP \f3while\fP \f2list\^\fP \f3do\fP \f2list\^\fP \f3done\fP A .B while command repeatedly executes the .B while .I list\^ and, if the exit status of the last command in the list is zero, executes the .B do .IR list ; otherwise the loop terminates. If no commands in the .B do .I list\^ are executed, then the .B while command returns a zero exit status; .B until may be used in place of .B while to negate the loop termination test. .TP \f3(\fP\f2list\^\fP\f3)\fP .br Execute .I list\^ in a sub-shell. .TP \f3{\fP\f2list\^\fP\f3;}\fP .br .I list\^ is simply executed. .PD .PP The following words are only recognized as the first word of a command and when not quoted: .if t .RS .PP .B .if n if then else elif fi case esac for while until do done { } .if t if then else elif f\&i case esac for while until do done { } .if t .RE .SS Comments. A word beginning with .B # causes that word and all the following characters up to a new line to be ignored. .SS Command Substitution. The standard outputted with the .IR variable. If a count specifier is used for the .B s or .B a command, then that many characters are printed. Otherwise successive characters are printed until either a null byte is reached or 128 characters are printed. The last variable may be redisplayed with the command .BR ./ . .PP The .IR sh (1) metacharacters .B \(** and .B ? may be used within procedure and variable names, providing a limited form of pattern matching. If no procedure name is given, variables local to the current procedure and global variables are matched; if a procedure name is specified, only variables local to that procedure are matched. To match only global variables, the form .BI : pattern\^ is used. .RE .TP 5 .PD 0 .IB linenumber ? lm .TP 5 \fIvariable:\fB?\fIlm\fR .PD Print the value at the address from .BR a.out or I space given by .I linenumber\^ or .IR variable (procedure name), according to the format .IR lm . The default format is `i'. .TP 5 .PD 0 .IB variable = lm .TP 5 .IB linenumber = lm .TP 5 .IB number .IR file2 . Identical lines of .I file1\^ and .I file2\^ are copied to .IR output . Sets of differences produced by .IR diff (1) are printed, where a set of differences share a common gutter character. After printing each set of differences, .I sdiff\^ prompts the user with a .B % and waits for one of the following user-typed commands: .PP .RS 19 .TP .B l append the left column to the output file .TP .B r append the right column to the output file .TP .B s turn on silent mode; do not print identical lines .TP .B v turn off silent mode .TP .B "e l" call the editor with the left column .TP .B "e r" call the editor with the right column .TP .B "e b" call the editor with the concatenation of left and right .TP .B e call the editor with a zero length file .TP .B q exit from the program .RE .sp .2i .RS 11 On exit from the editor, the resulting file is concatenated on the end of the .I output\^ file. .RE .SH SEE ALSO diff(1), ed(1). .\" @(#)sdiff.1 1.3  from a command enclosed in a pair of grave accents (\^\f3\*`\^\*`\fP\^) may be used as part or all of a word; trailing new lines are removed. .SS Parameter Substitution. The character .B $ is used to introduce substitutable .IR parameters . Positional parameters may be assigned values by .BR set . Variables may be set by writing: .RS .PP .IB name = value\^ \*(OK .IB name = value\^ \*(CK .\|.\|. .RE .PP Pattern-matching is not performed on .IR value . .PP .PD 0 .TP \f3${\fP\f2parameter\^\fP\f3}\fP A .I parameter\^ is a sequence of letters, digits, or underscores (a .IR name ), a digit, or any of the characters .BR \(** , .BR @ , .BR # , .BR ? , .BR \- , .BR $ , and .BR !\\^ . The value, if any, of the parameter is substituted. The braces are required only when .I parameter\^ is followed by a letter, digit, or underscore that is not to be interpreted as part of its name. A .I name\^ must begin with a letter or underscore. If .I parameter\^ is a digit then it is a positional parameter. If .I parameter\^ is .B \M = lm .PD Print the address of .I variable\^ or .IR linenumber , or the value of .IR number , in the format specified by .IR lm . If no format is given, then .B lx is used. The last variant of this command provides a convenient way to convert between decimal, octal and hexadecimal. .TP 5 .IB variable ! value Set .I variable\^ to the given .IR value . The value may be a number, a character constant or a variable. The value must be well defined; expressions that produce more than one value, such as structures, are not allowed. Character constants are denoted .BI ' character\fR. Numbers are viewed as integers unless a decimal point or exponent is used. In this case, they are treated as having the type double. Registers are viewed as integers. The .I variable may be an expression that indicates more than one variable, such as an array or structure name. If the address of a variable is given, it is regarded as the address of a variable of type .IR int . C conventions are used in any type conversions necessary to pe.TH SED 1 .SH NAME sed \- stream editor .SH SYNOPSIS .B sed [ .B \-n ] [ .B \-e script ] [ .B \-f sfile ] [ files ] .SH DESCRIPTION .I Sed\^ copies the named .I files\^ (standard input default) to the standard output, edited according to a script of commands. The .B \-f option causes the script to be taken from file .IR sfile ; these options accumulate. If there is just one .B \-e option and no .B \-f option, the flag .B \-e may be omitted. The .B \-n option suppresses the default output. A script consists of editing commands, one per line, of the following form: .sp .RS [ \|address \|[ \|, \|address \|] \|] \|function \|[ \|arguments \|] .RE .sp In normal operation, .I sed\^ cyclically copies a line of input into a .I pattern space\^ (unless there is something left after a .B D command), applies in sequence all commands whose .I addresses\^ select that pattern space, and at the end of the script copies the pattern space to the standard output (except under .BR \-n ) and deletes the pattern space. .PP Some of(** or .BR @ , then all the positional parameters, starting with .BR $1 , are substituted (separated by spaces). Parameter .B $0 is set from argument zero when the shell is invoked. .TP \f3${\fP\f2parameter\^\fP\f3:\-\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute its value; otherwise substitute .IR word . .TP \f3${\fP\f2parameter\^\fP\f3:=\fP\f2word\^\fP\f3}\fP If .I parameter\^ is not set or is null, set it to .IR word ; the value of the parameter is then substituted. Positional parameters may not be assigned in this way. .TP \f3${\fP\f2parameter\^\fP\f3:?\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute its value; otherwise, print .I word\^ and exit from the shell. If .I word\^ is omitted, the message .B "parameter null or not set" is printed. .TP \f3${\fP\f2parameter\^\fP\f3:+\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute .IR word ; otherwise substitute nothing. .PD .PP In the above structures, .I word\^ is not evaluated ulorux{X[^M  the commands use a .I hold space\^ to save all or part of the .I pattern space\^ for subsequent retrieval. .PP An .I address\^ is either a decimal number that counts input lines cumulatively across files, a .B $ that addresses the last line of input, or a context address, i.e., a .BI / "regular expression" / in the style of .IR ed (1) modified thus: .PP .TP 5 \(bu In a context address, the construction \f3\e\fP\f2?regular expression?\^\fP, where .IR ? is any character, is identical to .BI / "regular expression" /\fR.\fP Note that in the context address .BR \exabc\exdefx , the second .B x stands for itself, so that the regular expression is .BR abcxdef . .TP 5 \(bu The escape sequence .B \en matches a new-line character .I embedded\^ in the pattern space. .TP 5 \(bu A period .B . matches any character except the .I terminal\^ new-line character of the pattern space. .TP 5 \(bu A command line with no addresses selects every pattern space. .TP 5 \(bu A command line with one address selects each pattern space thnless it is to be used as the substituted string; in the following example, .B pwd is executed only if .B d is not set or is null: .RS .PP \f3echo \|${d:\-\^\*`\^pwd\^\*`\^}\f1 .RE .PP If the colon .RB ( : ) is omitted from the above expressions, then the shell only checks whether .I parameter\^ is set or not. .PP The following parameters are automatically set by the shell: .RS .PD 0 .TP .B # The number of positional parameters in decimal. .TP .B \- Flags supplied to the shell on invocation or by the .B set command. .TP .B ? The decimal value returned by the last synchronously executed command. .TP .B $ The process number of this shell. .TP .B ! The process number of the last background command invoked. .PD .RE .PP The following parameters are used by the shell: .RS .PD 0 .TP .B .SM HOME The default argument (home directory) for the .I cd\^ command. .TP .B .SM PATH The search path for commands (see .I Execution\^ below). The user may not change .B \s-1PATH\s+1 if executing under .IR rsh . .TP .B .SM CDPATH Trform the indicated assignment. .TP 5 .B x Print the machine registers and the current machine-language instruction. .TP 5 .B X Print the current machine-language instruction. .PP The commands for examining source files are: .PP .PD 0 .TP 5 .BI "e " procedure\^ .TP 5 .BI "e " file-name\^ .TP 5 .BI "e " directory/\^ .TP 5 .BI "e " "directory file-name"\^ .PD The first two forms set the current file to the file containing .I procedure\^ or to .IR file-name . The current line is set to the first line in the named procedure or file. Source files are assumed to be in .IR directory . The default is the current working directory. The latter two forms change the value of .IR directory . If no procedure, filename, or directory is given, the current procedure name and filename are reported. .TP 5 .BI / "regular expression" / Search forward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B / may be elided. .TP 5 .BI ? "regular expression" ? Search baat matches the address. .TP 5 \(bu A command line with two addresses selects the inclusive range from the first pattern space that matches the first address through the next pattern space that matches the second. (If the second address is a number less than or equal to the line number first selected, only one line is selected.)\ Thereafter the process is repeated, looking again for the first address. .PP Editing commands can be applied only to non-selected pattern spaces by use of the negation function .B ! (below). .PP In the following list of functions the maximum number of permissible addresses for each function is indicated in parentheses. .PP The .I text\^ argument consists of one or more lines, all but the last of which end with .B \e to hide the new-line character. Backslashes in text are treated like backslashes in the replacement string of an .B s command, and may be used to protect initial blanks and tabs against the stripping that is done on every script line. The .I rfile\^ or .I wfile\^ argumentN he search path for the .I cd command. .TP .B .SM MAIL If this variable is set to the name of a mail file, then the shell informs the user of the arrival of mail in the specified file. .TP .SM .B PS1 Primary prompt string, by default .RB `` "$ \|" ''. .TP .SM .B PS2 Secondary prompt string, by default .RB `` "> \|" ''. .TP .SM .B IFS Internal field separators, normally .BR space , .BR tab , and .BR "new line" . .PD .RE .PP The shell gives default values to \f3\s-1PATH\s+1\fP, \f3\s-1PS1\s+1\fP, \f3\s-1PS2\s+1\fP, and \f3\s-1IFS\s+1\fP, while .SM .B HOME and .SM .B MAIL are not set at all by the shell (although .SM .B HOME is set by .IR login (1)). .SS Blank Interpretation. After parameter and command substitution, the results of substitution are scanned for internal field separator characters (those found in .BR \s-1IFS\s+1 ) and split into distinct arguments where such characters are found. Explicit null arguments (\^\f3"\^"\fP or \f3\*'\^\*'\fP\^) are retained. Implicit null arguments (those resulting from .ckward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B ? may be elided. .TP 5 .B p Print the current line. .TP 5 .B z Print the current line followed by the next 9 lines. Set the current line to the last line printed. .TP 5 .B w Window. Print the 10 lines around the current line. .TP 5 .I number\^ Set the current line to the given line number. Print the new current line. .TP 5 .IB count + Advance the current line by .I count\^ lines. Print the new current line. .TP 5 .IB count \(mi Retreat the current line by .I count\^ lines. Print the new current line. .PP The commands for controlling the execution of the source program are: .PP .TP 5 \fIcount\fB r \fIargs\fR .br .ns .TP 5 \fIcount\fB R Run the program with the given arguments. The \fBr\fP command with no arguments reuses the previous arguments to the program while the \fBR\fP command runs the program with no arguments. An argument beginning with .B < or .B > causes redirection for the  must terminate the command line and must be preceded by exactly one blank. Each .I wfile\^ is created before processing begins. There can be at most 10 distinct .I wfile\^ arguments. .PP .PD 0 .TP 10 (1)\|\f3a\e\fP .br .ns .TP .I text\^ Append. Place .I text\^ on the output before reading the next input line. .TP .RI (2)\|\f3b\fP " label\^" Branch to the .B : command bearing the .IR label . If .I label\^ is empty, branch to the end of the script. .br .ne 2.1v .TP (2)\|\f3c\e\fP .br .ns .TP .I text\^ Change. Delete the pattern space. With 0 or 1 address or at the end of a 2-address range, place .I text\^ on the output. Start the next cycle. .TP (2)\|\f3d\fP Delete the pattern space. Start the next cycle. .TP (2)\|\f3D\fP Delete the initial segment of the pattern space through the first new-line character. Start the next cycle. .TP (2)\|\f3g\fP Replace the contents of the pattern space by the contents of the hold space. .TP (2)\|\f3G\fP Append the contents of the hold space to the pattern space. .TP (2)\|\f3h\I parameters\^ that have no values) are removed. .SS Filename Generation. Following substitution, each command .I word\^ is scanned for the characters .BR \(** , .BR ? , and .BR \*(OK . If one of these characters appears then the word is regarded as a .IR pattern . The word is replaced with alphabetically sorted filenames that match the pattern. If no filename is found that matches the pattern, then the word is left unchanged. The character .B . at the start of a filename or immediately following a .BR / , as well as the character .B / itself, must be matched explicitly. .PP .PD 0 .RS .TP .B \(** Matches any string, including the null string. .TP .B ? Matches any single character. .TP .BR \*(OK .\|.\|.\^ \*(CK Matches any one of the enclosed characters. A pair of characters separated by .B \- matches any character lexically between the pair, inclusive. If the first character following the opening \`\`\*(OK\'\' is a .B "``!''" then any character not enclosed is matched. .PD .RE .SS Quoting. The following charN standard input or output respectively. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fIlinenumber\fB c\fI count\fR .br .ns .TP 5 \fIlinenumber\fB C\fI count\fR Continue after a breakpoint or interrupt. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. \fBC\fP continues with the signal that caused the program to stop reactivated and \fBc\fP ignores it. If a linenumber is specified then a temporary breakpoint is placed at the line and execution is continued. The breakpoint is deleted when the command finishes. .TP 5 \fIlinenumber\fB g\fI count\fR Continue after a breakpoint with execution resumed at the given line. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fBs \fIcount\fR .br .ns .TP 5 \fBS \fIcount\fR Single step the program through \fIcount\fP lines. If no count is given then the program is run for one line. .B S is equivalent to .B s except it steps through procedure calls. .TP 5 \fBi\fR .br .ns .fP Replace the contents of the hold space by the contents of the pattern space. .TP (2)\|\f3H\fP Append the contents of the pattern space to the hold space. .TP (1)\|\f3i\e\fP .br .ns .TP .I text\^ Insert. Place .I text\^ on the standard output. .TP (2)\|\f3l\fP List the pattern space on the standard output in an unambiguous form. Non-printing characters are spelled in two-digit .SM ASCII and long lines are folded. .TP (2)\|\f3n\fP Copy the pattern space to the standard output. Replace the pattern space with the next line of input. .TP (2)\|\f3N\fP Append the next line of input to the pattern space with an embedded new-line character. (The current line number changes.) .TP (2)\|\f3p\fP Print. Copy the pattern space to the standard output. .TP (2)\|\f3P\fP Copy the initial segment of the pattern space through the first new-line character to the standard output. .TP (1)\|\f3q\fP Quit. Branch to the end of the script. Do not start a new cycle. .TP .RI (2)\|\f3r\fP " rfile\^" Read the contents of .IR rfile . Placwz}TP 5 \fBI\fR Single step by one machine-language instruction. \fBI\fP steps with the signal that caused the program to stop reactivated and \fBi\fP ignores it. .TP 5 \fIvariable$\fBm \fIcount\fR .br .ns .TP 5 \fIaddress:\fBm \fIcount\fR Single step (as with \fBs\fP) until the specified location is modified with a new value. If \fIcount\fP is omitted, it is effectively infinity. \fIVariable\fR must be accessible from the current procedure. Since this command is done by software, it can be very slow. .TP 5 \fIlevel\fB v \fR Toggle verbose mode, for use when single stepping with \fBS\fP, \fBs\fP or \fBm\fP. If \fIlevel\fP is omitted, then just the current source file and/or subroutine name is printed when either changes. If \fIlevel\fP is 1 or greater, each C source line is printed before it is executed; if \fIlevel\fP is 2 or greater, each assembler statement is also printed. A \fBv\fP turns verbose mode off if it is on for any level. .TP 5 .B k Kill the program being debugged. .TP 5 procedure\fB(\fParg1,arg2,.O e them on the output before reading the next input line. .TP .RI (2)\|\f3s\fP/ "regular expression" / replacement / flags\^ Substitute the .I replacement\^ string for instances of the .I regular expression\^ in the pattern space. Any character may be used instead of .BR / . For a fuller description see .IR ed (1). .I Flags\^ is zero or more of: .RS .RS .TP .B g Global. Substitute for all nonoverlapping instances of the .I regular expression\^ rather than just the first one. .TP .B p Print the pattern space if a replacement was made. .TP .BI w " wfile\^" Write. Append the pattern space to .I wfile\^ if a replacement was made. .RE .RE .TP .RI (2)\|\f3t\fP " label\^" Test. Branch to the .B : command bearing the .I label\^ if any substitutions have been made since the most recent reading of an input line or execution of a .BR t . If .I label\^ is empty, branch to the end of the script. .TP .RI (2)\|\f3w\fP " wfile\^" Write. Append the pattern space to .IR wfile . .TP (2)\|\f3x\fP Exchange the contents of the pattacters have a special meaning to the shell and cause termination of a word unless quoted: .RS .PP \f3; & ( ) \(bv ^ < > new\^line space tab\fP .RE .PP A character may be .I quoted\^ (i.e., made to stand for itself) by preceding it with a .BR \e . The pair .B \enew line is ignored. All characters enclosed between a pair of single quote marks (\^\f3\*'\^\*'\fP\^), except a single quote, are quoted. Inside double quote marks (\f3"\^"\fP), parameter and command substitution occur and .B \e quotes the characters .BR \e , .BR \*` , \f3"\fP, and .BR $ . .B "$\(**" is equivalent to \f3"$1 \|$2\fP \|.\|.\|.\f3"\fP, whereas .B "$@" is equivalent to .B "$1"\| .B "$2"\| \&.\|.\|.\|. .SS Prompting. When used interactively, the shell prompts with the value of .SM .B PS1 before reading a command. If at any time a new-line character is typed and further input is needed to complete a command, then the secondary prompt (i.e., the value of .BR \s-1PS2\s+1 ) is issued. .SS Input/Output. Before a command is executed, it..\fB)\fP .br .ns .TP 5 procedure\fB(\fParg1,arg2,...\fB)/\fP\fIm\fP Execute the named procedure with the given arguments. Arguments can be integer, character or string constants or names of variables accessible from the current procedure. The second form causes the value returned by the procedure to be printed according to format \fIm\fP. If no format is given, it defaults to .BR d . .TP 5 \fIlinenumber\fB b\fR \fIcommands\fR Set a breakpoint at the given line. If a procedure name without a line number is given (e.g., \fBproc:\fR), a breakpoint is placed at the first line in the procedure even if it was not compiled with the .B \-g option. If no \fIlinenumber\fP is given, a breakpoint is placed at the current line. If no .I commands\^ are given, execution stops just before the breakpoint and control is returned to .IR sdb . Otherwise the .I commands\^ are executed when the breakpoint is encountered and execution continues. Multiple commands are specified by separating them with semicolons. If \fBk\fP is useern and hold spaces. .TP .RI (2)\|\f3y\fP/ string1 / string2 /\^ Transform. Replace all occurrences of characters in .I string1\^ with the corresponding character in .IR string2 . The lengths of .I string1 and .I string2\^ must be equal. .TP .RI (2)\f3!\fP " function\^" Don't. Apply the .I function\^ (or group, if .I function\^ is .BR {\| ) only to lines .I not\^ selected by the address(es). .TP .RI (0)\|\f3:\fP " label\^" This command does nothing; it bears a .I label\^ for .B b and .B t commands to branch to. .TP (1)\|\f3=\fP Place the current line number on the standard output as a line. .TP (2)\|\f3{\fP Execute the following commands through a matching .B } only when the pattern space is selected. .TP (0)\| An empty command is ignored. .PD .SH SEE ALSO awk(1), ed(1), grep(1). .br ``Stream Editor'' in the .IR "\*(6) Document Processing Guide" . .\" @(#)sed.1 1.7 O s input and output may be redirected using a special notation interpreted by the shell. The following may appear anywhere in a simple-command or may precede or follow a command and are not passed on to the invoked command; substitution occurs before .I word\^ or .I digit\^ is used: .PP .PD 0 .TP 14 .B word Use file .I word\^ as standard output (file descriptor 1). If the file does not exist, it is created; otherwise, it is truncated to zero length. .TP .B >\h@-.3m@>word Use file .I word\^ as standard output. If the file exists, output is appended to it (by first seeking to the end-of-file); otherwise, the file is created. .TP \f3<\h@-.3m@<\fP\*(OK\f3\-\fP\*(CK\f3word\fP The shell input is read up to a line that is the same as .IR word , or to an end-of-file. The resulting document becomes the standard input. If any character of .I word\^ is quoted, then no interpretation is placed upon the characters of the document; otherwise, parameter d as a command to execute at a breakpoint, control returns to .IR sdb , instead of continuing execution. .TP 5 .B B Print a list of the currently active breakpoints. .TP 5 \fIlinenumber\fB d\fR Delete a breakpoint at the given line. If no \fIlinenumber\fP is given, the breakpoints are deleted interactively. Each breakpoint location is printed and a line is read from the standard input. If the line begins with a .B y or .B d , the breakpoint is deleted. .TP 5 .B D Delete all breakpoints. .TP 5 .B l Print the last executed line. .TP 5 \fIlinenumber\fB a\fR Announce. If \fIlinenumber\fR is of the form .IB proc : number\fR, the command effectively does a .IB "linenumber " "b l\fR. If \fIlinenumber\fR is of the form .IB proc :\fR, the command effectively does a .IB proc ": b T"\fR. .PP Miscellaneous commands: .TP 5 .BI ! command\^ The command is interpreted by .IR sh (1). .TP 5 .B new-line If the previous command printed a source line, advance the current line by one line and print the new current line. If the pre.if t .ds ' \h@.05m@\s+4\v@.333m@\'\v@-.333m@\s-4\h@.05m@ .if n .ds ' ' .if t .ds ` \h@.05m@\s+4\v@.333m@\`\v@-.333m@\s-4\h@.05m@ .if n .ds ` ` .ds OK [\| .ds CK \|] .TH SH 1 .SH NAME sh, rsh \- shell, the standard/restricted command programming language .SH SYNOPSIS .B sh [ .B \-ceiknrstuvx ] [ args ] .br .B rsh [ .B \-ceiknrstuvx ] [ args ] .SH DESCRIPTION .I Sh\^ is a command programming language that executes commands read from a terminal or a file. .I Rsh\^ is a restricted version of the standard command interpreter .IR sh ; it is used to set up login names and execution environments whose capabilities are more controlled than those of the standard shell. See .I Invocation\^ below for the meaning of arguments to the shell. .SS Commands. A .I simple-command\^ is a sequence of non-blank .I words\^ separated by .I blanks\^ (a .I blank\^ is a tab or a space). The first word specifies the name of the command to be executed. Except as specified below, the remaining words are passed as arguments to the invoked substitution and command substitution occur, (unescaped) .B \enew line is ignored, and .B \e must be used to quote the characters .BR \e , .BR $ , .BR \*` , and the first character of .IR word . If .B \- is appended to .BR <\h@-.3m@< , all leading tabs are stripped from .I word\^ and from the document. .TP .B <&digit The standard input is duplicated from file descriptor .I digit\^ (see .IR dup (2)). The standard output can be duplicated similarly, using .B > in place of .BR < . .TP .B <&\- The standard input is closed. The standard output can be closed similarly, using .B > in place of .BR < . .PD .PP If one of the above is preceded by a digit, the file descriptor created is that specified by the digit (instead of the default 0 or 1). For example: .RS .PP \f3\&.\|.\|. \|2>&1\f1 .RE .PP creates file descriptor 2 that is a duplicate of file descriptor 1. .PP If a command is followed by .BR & , the default standard input for the command is the empty file .BR /dev/null . Otherwise, the environment for the execu